diff --git a/cockroachdb/example/cert-manager/db-init-manifests/example-database/example-database-init-job.yaml b/cockroachdb/example/cert-manager/db-init-manifests/example-database/init.yaml similarity index 71% rename from cockroachdb/example/cert-manager/db-init-manifests/example-database/example-database-init-job.yaml rename to cockroachdb/example/cert-manager/db-init-manifests/example-database/init.yaml index 0ec965a..5cb38d2 100644 --- a/cockroachdb/example/cert-manager/db-init-manifests/example-database/example-database-init-job.yaml +++ b/cockroachdb/example/cert-manager/db-init-manifests/example-database/init.yaml @@ -14,3 +14,11 @@ spec: # name of the user that the init job will grant access on the DB to - name: DB_USER value: "example_user" +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: cockroach-client +spec: + commonName: example_user + secretName: cockroachdb.client.example_user diff --git a/cockroachdb/example/cert-manager/db-init-manifests/example-database/kustomization.yaml b/cockroachdb/example/cert-manager/db-init-manifests/example-database/kustomization.yaml index 77c02d5..0aa8c40 100644 --- a/cockroachdb/example/cert-manager/db-init-manifests/example-database/kustomization.yaml +++ b/cockroachdb/example/cert-manager/db-init-manifests/example-database/kustomization.yaml @@ -10,15 +10,4 @@ resources: namePrefix: example-database- patches: - - path: example-database-init-job.yaml - - patch: |- - - op: replace - path: /spec/commonName - value: "example_user" - - op: replace - path: /spec/secretName - value: "cockroachdb.client.example-user" - target: - kind: Certificate - name: cockroach-client - version: v1 + - path: init.yaml