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

ENG-4564: Require dopplersecret resources to be in operator namespace #22

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

nmanoogian
Copy link
Member

Previously, the operator would process dopplersecret resources in any namespace, effectively allowing token secrets to be read and managed secrets to be updated in any namespace in the cluster. This pattern is unintuitive and inconsistent with the Kubernetes RBAC rules. This PR requires all dopplersecret resources to be in the same namespace as the operator deployment (doppler-operator-system by default) in order to be reconciled.

Closes #21

@@ -6,6 +6,7 @@ require (
github.com/go-logr/logr v0.3.0
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -100,7 +100,7 @@ build: generate fmt vet ## Build manager binary.
go build ${GO_BUILD_VERSION_FLAGS} -o bin/manager main.go

run: manifests generate fmt vet ## Run a controller from your host. Does not use VERSION flags.
go run ./main.go
POD_NAMESPACE=doppler-operator-system go run ./main.go
Copy link
Member Author

Choose a reason for hiding this comment

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

For debugging only

@nmanoogian nmanoogian merged commit c55ad5e into main Aug 8, 2022
@nmanoogian nmanoogian deleted the nic/require-cr-operator-namespace branch August 8, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Shouldn't allow DopplerSecret in another namespace access doppler-operator-system namespace secrets
2 participants