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

add(): add CRD for GCPAuthEngineConfig #242

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -425,4 +425,4 @@ resources:
defaulting: true
validation: true
webhookVersion: v1
version: "3"
version: "3"
2 changes: 1 addition & 1 deletion api/v1alpha1/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ var _ = BeforeSuite(func() {
Expect(err).NotTo(HaveOccurred())

err = (&GCPAuthEngineConfig{}).SetupWebhookWithManager(mgr)
Expect(err).NotTo(HaveOccurred())
Expect(err).NotTo(HaveOccurred())

err = (&GCPAuthEngineRole{}).SetupWebhookWithManager(mgr)
Expect(err).NotTo(HaveOccurred())
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ resources:
- redhatcop_v1alpha1_azureauthenginerole.yaml
- redhatcop_v1alpha1_gcpauthengineconfig.yaml
- redhatcop_v1alpha1_gcpauthenginerole.yaml

#+kubebuilder:scaffold:manifestskustomizesamples
1 change: 0 additions & 1 deletion docs/auth-engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ spec:

The endpoint value provided for a given key has the form of scheme://host:port. The scheme:// and :port portions of the endpoint value are optional.


## GCPAuthEngineRole
The `GCPAuthEngineRole` CRD allows a user to register a role in an authentication engine mount of type [Google Cloud](https://developer.hashicorp.com/vault/api-docs/auth/gcp#create-update-role).

Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "GCPAuthEngineConfig")
os.Exit(1)
}

if err = (&controllers.GCPAuthEngineRoleReconciler{ReconcilerBase: vaultresourcecontroller.NewFromManager(mgr, "GCPAuthEngineRole")}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "GCPAuthEngineRole")
os.Exit(1)
}

if err = (&controllers.VaultSecretReconciler{ReconcilerBase: vaultresourcecontroller.NewFromManager(mgr, "VaultSecret")}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "VaultSecret")
os.Exit(1)
Expand Down Expand Up @@ -307,6 +309,7 @@ func main() {
setupLog.Error(err, "unable to create webhook", "webhook", "GCPAuthEngineConfig")
os.Exit(1)
}

if err = (&redhatcopv1alpha1.GCPAuthEngineRole{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "GCPAuthEngineRole")
os.Exit(1)
Expand Down