Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] - Revision Variables #896

Open
wants to merge 53 commits into
base: develop
Choose a base branch
from
Open

[BUGFIX] - Revision Variables #896

wants to merge 53 commits into from

Conversation

gambol99
Copy link
Member

When no variable are availble we should skip the question

dependabot bot and others added 30 commits June 15, 2023 13:22
Bumps [k8s.io/code-generator](https://github.com/kubernetes/code-generator) from 0.27.2 to 0.27.3.
- [Commits](kubernetes/code-generator@v0.27.2...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/code-generator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.27.2 to 0.27.3.
- [Commits](kubernetes/apimachinery@v0.27.2...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.9.3...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Currently terraform modules are exposed as raw configurations for consumption. With this pull request the idea is to wrap these into managed, sanctioned and tested packages which can be maintained by the platform team and consumed by the developers. The feature attempts to remove much of the leg work, open-end nature, and provide the developers with a reliable consumption model
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.53.2 to 1.53.3.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.53.2...v1.53.3)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
[create-pull-request] automated change

Co-authored-by: gambol99 <gambol99@users.noreply.github.com>
* [FEATURE] - Cloud Resource and Module Plans

Currently terraform modules are exposed as raw configurations for consumption. With this pull request the idea is to wrap these into managed, sanctioned and tested packages which can be maintained by the platform team and consumed by the developers. The feature attempts to remove much of the leg work, open-end nature, and provide the developers with a reliable consumption model

* [FEATURE] - Create Revision Command

Adding a beta version of the create revision command
* Bump github.com/aws/aws-sdk-go from 1.44.281 to 1.44.285

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.281 to 1.44.285.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.281...v1.44.285)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* - fixing up the aws issue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rohith Jayawardene <gambol99@gmail.com>
Permit the user to indicate that default variables can be injected
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Currently the controller will permit the update of a Revision which is currently in use. This means the ground and shift underneath a cloudresource without the user knowing. The correct way for changes to be made is a new Revision created and the consumer to move to the new version
Currently a consumer would not be aware if a Cloud Resource has updates availabe, without checking the plan. In the pull request we have added a prometheus metrics for monitoring purposes which tracks if an updates is available as well as a status flag which is show on the kubectl get cloudresource, indicates an update is available
Currently the creation of a workflow is via 'tnctl workflow create'; given we now have a 'tnctl create' verb now, feels best to move the command
This is largely just a convience command and it's annoying jumpiny between kubectl and tnctl. This feature simply calls the 'kubectl get' command for each of the resource types
Updating the convert command to also retrieve provider and policies
Given the addition of the available update status, it's useful to reconcile on changes to the plan as it can keep the field in sync. This PR adds to the cloud resource controller the abilty to reconcile all cloud resource which reference a plan X, when plan X has a generational change
Moving a couple commands under create to reduce the verbage
* [CLI] - Moving Commands Under Create

Moving a couple commands under create to reduce the verbage

* [BUILD] - Allowing Framework to be Overriden

Allowing the checkov framework to be overriden
Currently their is no format to the inputs to give consumers an understanding on the expected type. In thie PR we've added a type field and copied in the variable type from terraform variables
Fixing up the json tags on the fields
Adding a default to the template to ensure we always have thing set
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.10.0 to 2.11.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.10.0...v2.11.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.285 to 1.44.288.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.285...v1.44.288)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The configuration controller was not setting the .status.resourceStatus correctly; which meant resources which were out of sync and waiting for a approval was not showing in the status (just the overall .status.condition). The logic was correctly i.e. it was still waiting for approval, just not indicating on the status
Adding the type field and using a pointer
Currently there is no easy wasy to test wheather a Revision is going to be successful without going through an iteration loop to check; covering terraform, module variables, checkov policies, constraints and so forth. This places an number of obstacles in the way to the platform engineer in getting a artifact ready for use. This in the change, we've introduced a 'tnctl verify revision' comnand will and use either in cluster configure or code to verify a Revision will work before going into a death loop iteration
* [FEATURE] - Verify Revision CLI

Currently there is no easy wasy to test wheather a Revision is going to be successful without going through an iteration loop to check; covering terraform, module variables, checkov policies, constraints and so forth. This places an number of obstacles in the way to the platform engineer in getting a artifact ready for use. This in the change, we've introduced a 'tnctl verify revision' comnand will and use either in cluster configure or code to verify a Revision will work before going into a death loop iteration

* [FEATURE] - Revisions in Use Metric

Update the revisions crd to include a counter on the number of cloud resources using it + a prometheus metric
Adding some convenience aliases to kubectl apply and delete, just makes it easier not to switch between commands
gambol99 and others added 23 commits June 24, 2023 20:02
The current implmentation is using namespace match to generate the checkov policy - it makes more sense to test the revision against all possible policies in the cluster; plus has the benefit on not relying on the need to speak to a cluster when checking
Currently due to the os.Exit(1) the temp directory when using tnctl verify revision is not be deleted when checks fails. This PR fixes the issues
)

Ignoring the verification if the module spec has a local directory
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.288 to 1.44.289.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.288...v1.44.289)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fixing up the E2E checks to ensure the feature works as expected
We should only enable the update protection if there is an update to the spec, changes to annotations and labels if fine
Fixing up some of the elements in the cloud resource E2E's
Adding back integration testing for Azure
* Bump sigs.k8s.io/controller-runtime from 0.14.6 to 0.15.0

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.6 to 0.15.0.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.14.6...v0.15.0)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* - fixing up the dependencies from this upgrade

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rohith Jayawardene <gambol99@gmail.com>
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.26.3 to 0.27.3.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](kubernetes/client-go@v0.26.3...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.3 to 0.27.3.
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](kubernetes/apiextensions-apiserver@v0.26.3...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.26.3 to 0.27.3.
- [Commits](kubernetes/cli-runtime@v0.26.3...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/cli-runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](mvdan/sh@v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: mvdan.cc/sh/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.289 to 1.44.290.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.289...v1.44.290)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.290 to 1.44.291.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.290...v1.44.291)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.291 to 1.44.293.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.291...v1.44.293)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fixing up the job to pull in the image it was breaking builds
[create-pull-request] automated change

Co-authored-by: gambol99 <gambol99@users.noreply.github.com>
Adding the drift detection flag to the output of kubectl to indicate the status
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.293 to 1.44.295.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.293...v1.44.295)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.295 to 1.44.297.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG_PENDING.md)
- [Commits](aws/aws-sdk-go@v1.44.295...v1.44.297)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
When no variable are availble we should skip the question
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants