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

remove legacy Settings type #10458

Merged
merged 8 commits into from
Jan 16, 2025
Merged

remove legacy Settings type #10458

merged 8 commits into from
Jan 16, 2025

Conversation

lgadban
Copy link
Contributor

@lgadban lgadban commented Jan 15, 2025

The controller and deployer had a few dependencies on the legacy Gloo Settings type. This commit removes the usage of the Settings type and KRT collection and replaces it with a 1:1 copy that is non-KRT driven and purely derived from environment variables.

These can be set with "KGW_" prefixing the setting name (from the struct)
e.g.

KGW_ISTIOINTEGRATION: true
KGW_ENABLEAUTOMTLS: true

Testing

As e2e testing is currently broken, this can be manually tested by setting the appropriate env vars on the deployment

        - name: KGW_ISTIOINTEGRATION
          value: "true"
        - name: KGW_ENABLEAUTOMTLS
          value: "true"

While e2e testing is disable, the ggv2test envtests DO test with istio features enabled, so we do have some proof the feature still works

The controller and deployer had a few dependencies on the legacy
Gloo Settings type. This commit removes the usage of the Settings
type and KRT collection and replaces it with a 1:1 copy that is
non-KRT driven and purely derived from environment variables.
stevenctl pushed a commit to stevenctl/gloo that referenced this pull request Jan 15, 2025
Co-authored-by: changelog-bot <changelog-bot>
Co-authored-by: Sam Heilbron <[email protected]>
)

type Settings struct {
IstioIntegration bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IstioIntegration bool
EnableIstioIntegration bool

@lgadban lgadban enabled auto-merge January 16, 2025 18:38
@lgadban lgadban disabled auto-merge January 16, 2025 18:38
@lgadban
Copy link
Contributor Author

lgadban commented Jan 16, 2025

fixes #10445

Copy link
Member

@timflannagan timflannagan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An envvar-based approach SGTM. I think we'll ideally want the new chart to enable/disable this once that API has been fleshed out more. WYDT? Should we add that as a line item to the new chart tracker.

@lgadban
Copy link
Contributor Author

lgadban commented Jan 16, 2025

An envvar-based approach SGTM. I think we'll ideally want the new chart to enable/disable this once that API has been fleshed out more. WYDT? Should we add that as a line item to the new chart tracker.

Yes definitely. There is an existing helm API for this, so I would imagine as we look for which features to port over, this needs to be one of them. A specific line-item sounds like a good idea!

@lgadban lgadban enabled auto-merge January 16, 2025 21:32
@lgadban lgadban added this pull request to the merge queue Jan 16, 2025
Merged via the queue into main with commit f748395 Jan 16, 2025
5 checks passed
@lgadban lgadban deleted the law/settings-as-env branch January 16, 2025 21:43
timflannagan added a commit to timflannagan/kgateway that referenced this pull request Jan 23, 2025
This removes the Settings CR from the setup.yaml bootstrap
configuration in the envtests. The kgateway chart does not
carry this CR over to it's crds/ directory or have the RBAC
permissions to watch, list, etc. the resource.

Previously, we removed the legacy Settings logic in the gateway2
control plane in kgateway-dev#10458, so this resource is no longer necessary
in the setup.yaml and envtest fails trying to deploy it with the
new chart.

Signed-off-by: timflannagan <[email protected]>
timflannagan added a commit to timflannagan/kgateway that referenced this pull request Jan 24, 2025
This removes the Settings CR from the setup.yaml bootstrap
configuration in the envtests. The kgateway chart does not
carry this CR over to it's crds/ directory or have the RBAC
permissions to watch, list, etc. the resource.

Previously, we removed the legacy Settings logic in the gateway2
control plane in kgateway-dev#10458, so this resource is no longer necessary
in the setup.yaml and envtest fails trying to deploy it with the
new chart.

Signed-off-by: timflannagan <[email protected]>
@lgadban lgadban linked an issue Jan 24, 2025 that may be closed by this pull request
@lgadban lgadban removed a link to an issue Jan 24, 2025
@lgadban lgadban linked an issue Jan 24, 2025 that may be closed by this pull request
timflannagan added a commit to timflannagan/kgateway that referenced this pull request Jan 24, 2025
This removes the Settings CR from the setup.yaml bootstrap
configuration in the envtests. The kgateway chart does not
carry this CR over to it's crds/ directory or have the RBAC
permissions to watch, list, etc. the resource.

Previously, we removed the legacy Settings logic in the gateway2
control plane in kgateway-dev#10458, so this resource is no longer necessary
in the setup.yaml and envtest fails trying to deploy it with the
new chart.

Signed-off-by: timflannagan <[email protected]>
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.

use env vars for settings
4 participants