diff --git a/class/defaults.yml b/class/defaults.yml index 7fad05c..5283ea2 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -1,7 +1,7 @@ parameters: cert_exoscale: =_metadata: {} - namespace: syn-cert-exoscale + namespace: syn-cert-manager manifestVersion: v0.3.0 kustomizeInput: diff --git a/component/main.jsonnet b/component/main.jsonnet index 83af169..2887cfe 100644 --- a/component/main.jsonnet +++ b/component/main.jsonnet @@ -5,18 +5,6 @@ local inv = kap.inventory(); // The hiera parameters for the component local params = inv.parameters.cert_exoscale; -local isOpenshift = std.member([ 'openshift', 'oke' ], inv.parameters.facts.distribution); - -local namespace = kube.Namespace(params.namespace) { - metadata+: { - labels+: { - 'app.kubernetes.io/name': params.namespace, - // Configure the namespaces so that the OCP4 cluster-monitoring - // Prometheus can find the servicemonitors and rules. - [if isOpenshift then 'openshift.io/cluster-monitoring']: 'true', - }, - }, -}; local secret = kube.Secret('exoscale-secret') { metadata+: { @@ -30,6 +18,5 @@ local secret = kube.Secret('exoscale-secret') { // Define outputs below { - '00_namespace': namespace, '20_secret': secret, } diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index fb7e3c6..1845aff 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -2,14 +2,6 @@ The parent key for all of the following parameters is `cert_exoscale`. -== `namespace` - -[horizontal] -type:: string -default:: `syn-cert-exoscale` - -The namespace in which to deploy this component. - == `kustomizeInput` diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/00_namespace.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/00_namespace.yaml deleted file mode 100644 index c83c3ef..0000000 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/00_namespace.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - annotations: {} - labels: - app.kubernetes.io/name: syn-cert-exoscale - name: syn-cert-exoscale - name: syn-cert-exoscale diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/apiregistration.k8s.io_v1_apiservice_v1alpha1.acme.exoscale.com.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/apiregistration.k8s.io_v1_apiservice_v1alpha1.acme.exoscale.com.yaml index 9d97d62..35fba60 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/apiregistration.k8s.io_v1_apiservice_v1alpha1.acme.exoscale.com.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/apiregistration.k8s.io_v1_apiservice_v1alpha1.acme.exoscale.com.yaml @@ -2,7 +2,7 @@ apiVersion: apiregistration.k8s.io/v1 kind: APIService metadata: annotations: - cert-manager.io/inject-ca-from: syn-cert-exoscale/cert-manager-webhook-exoscale-webhook-tls + cert-manager.io/inject-ca-from: syn-cert-manager/cert-manager-webhook-exoscale-webhook-tls labels: app: exoscale-webhook chart: exoscale-webhook-0.3.0 @@ -14,6 +14,6 @@ spec: groupPriorityMinimum: 1000 service: name: cert-manager-webhook-exoscale - namespace: syn-cert-exoscale + namespace: syn-cert-manager version: v1alpha1 versionPriority: 15 diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/apps_v1_deployment_cert-manager-webhook-exoscale.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/apps_v1_deployment_cert-manager-webhook-exoscale.yaml index beb5677..8cbed23 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/apps_v1_deployment_cert-manager-webhook-exoscale.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/apps_v1_deployment_cert-manager-webhook-exoscale.yaml @@ -7,7 +7,7 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale - namespace: syn-cert-exoscale + namespace: syn-cert-manager spec: replicas: 1 selector: diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-ca.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-ca.yaml index 190b3b2..133ed00 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-ca.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-ca.yaml @@ -7,9 +7,9 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale-ca - namespace: syn-cert-exoscale + namespace: syn-cert-manager spec: - commonName: ca.exoscale-webhook.syn-cert-exoscale + commonName: ca.exoscale-webhook.syn-cert-manager duration: 43800h0m0s isCA: true issuerRef: diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-webhook-tls.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-webhook-tls.yaml index 2d3cb3b..13070c9 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-webhook-tls.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-webhook-tls.yaml @@ -7,12 +7,12 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale-webhook-tls - namespace: syn-cert-exoscale + namespace: syn-cert-manager spec: dnsNames: - cert-manager-webhook-exoscale - - cert-manager-webhook-exoscale.syn-cert-exoscale - - cert-manager-webhook-exoscale.syn-cert-exoscale.svc + - cert-manager-webhook-exoscale.syn-cert-manager + - cert-manager-webhook-exoscale.syn-cert-manager.svc duration: 8760h0m0s issuerRef: name: cert-manager-webhook-exoscale-ca diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_issuer_cert-manager-webhook-exoscale-ca.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_issuer_cert-manager-webhook-exoscale-ca.yaml index 5f7c0d3..f762570 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_issuer_cert-manager-webhook-exoscale-ca.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_issuer_cert-manager-webhook-exoscale-ca.yaml @@ -7,7 +7,7 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale-ca - namespace: syn-cert-exoscale + namespace: syn-cert-manager spec: ca: secretName: cert-manager-webhook-exoscale-ca diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_issuer_cert-manager-webhook-exoscale-selfsign.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_issuer_cert-manager-webhook-exoscale-selfsign.yaml index 8ed1845..159f87a 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_issuer_cert-manager-webhook-exoscale-selfsign.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/cert-manager.io_v1_issuer_cert-manager-webhook-exoscale-selfsign.yaml @@ -7,6 +7,6 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale-selfsign - namespace: syn-cert-exoscale + namespace: syn-cert-manager spec: selfSigned: {} diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_clusterrolebinding_cert-manager-webhook-exoscale:auth-delegator.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_clusterrolebinding_cert-manager-webhook-exoscale:auth-delegator.yaml index a7ef80b..aafe544 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_clusterrolebinding_cert-manager-webhook-exoscale:auth-delegator.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_clusterrolebinding_cert-manager-webhook-exoscale:auth-delegator.yaml @@ -15,4 +15,4 @@ subjects: - apiGroup: "" kind: ServiceAccount name: cert-manager-webhook-exoscale - namespace: syn-cert-exoscale + namespace: syn-cert-manager diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_role_cert-manager-webhook-exoscale:secrets-reader.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_role_cert-manager-webhook-exoscale:secrets-reader.yaml index 0a89edd..9146b00 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_role_cert-manager-webhook-exoscale:secrets-reader.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_role_cert-manager-webhook-exoscale:secrets-reader.yaml @@ -7,7 +7,7 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale:secrets-reader - namespace: syn-cert-exoscale + namespace: syn-cert-manager rules: - apiGroups: - "" diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_rolebinding_cert-manager-webhook-exoscale:secrets-reader.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_rolebinding_cert-manager-webhook-exoscale:secrets-reader.yaml index 47e2c18..7f1ce15 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_rolebinding_cert-manager-webhook-exoscale:secrets-reader.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_rolebinding_cert-manager-webhook-exoscale:secrets-reader.yaml @@ -7,7 +7,7 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale:secrets-reader - namespace: syn-cert-exoscale + namespace: syn-cert-manager roleRef: apiGroup: rbac.authorization.k8s.io kind: Role @@ -16,4 +16,4 @@ subjects: - apiGroup: "" kind: ServiceAccount name: cert-manager-webhook-exoscale - namespace: syn-cert-exoscale + namespace: syn-cert-manager diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_rolebinding_cert-manager-webhook-exoscale:webhook-authentication-reader.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_rolebinding_cert-manager-webhook-exoscale:webhook-authentication-reader.yaml index 3d5a935..35b0033 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_rolebinding_cert-manager-webhook-exoscale:webhook-authentication-reader.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/rbac.authorization.k8s.io_v1_rolebinding_cert-manager-webhook-exoscale:webhook-authentication-reader.yaml @@ -7,7 +7,7 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale:webhook-authentication-reader - namespace: syn-cert-exoscale + namespace: syn-cert-manager roleRef: apiGroup: rbac.authorization.k8s.io kind: Role @@ -16,4 +16,4 @@ subjects: - apiGroup: "" kind: ServiceAccount name: cert-manager-webhook-exoscale - namespace: syn-cert-exoscale + namespace: syn-cert-manager diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/v1_service_cert-manager-webhook-exoscale.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/v1_service_cert-manager-webhook-exoscale.yaml index 431d510..b878491 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/v1_service_cert-manager-webhook-exoscale.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/v1_service_cert-manager-webhook-exoscale.yaml @@ -7,7 +7,7 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale - namespace: syn-cert-exoscale + namespace: syn-cert-manager spec: ports: - name: https diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/v1_serviceaccount_cert-manager-webhook-exoscale.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/v1_serviceaccount_cert-manager-webhook-exoscale.yaml index 98fcbeb..6c6ebfa 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/v1_serviceaccount_cert-manager-webhook-exoscale.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/10_kustomize/cert-exoscale/v1_serviceaccount_cert-manager-webhook-exoscale.yaml @@ -7,4 +7,4 @@ metadata: heritage: Helm release: exoscale-webhook name: cert-manager-webhook-exoscale - namespace: syn-cert-exoscale + namespace: syn-cert-manager diff --git a/tests/golden/defaults/cert-exoscale/cert-exoscale/20_secret.yaml b/tests/golden/defaults/cert-exoscale/cert-exoscale/20_secret.yaml index f06685f..5fe82cf 100644 --- a/tests/golden/defaults/cert-exoscale/cert-exoscale/20_secret.yaml +++ b/tests/golden/defaults/cert-exoscale/cert-exoscale/20_secret.yaml @@ -6,7 +6,7 @@ metadata: labels: name: exoscale-secret name: exoscale-secret - namespace: syn-cert-exoscale + namespace: syn-cert-manager stringData: EXOSCALE_API_KEY: t-silent-test-1234/c-green-test-1234/exoscale/cert_webhook/s3_access_key EXOSCALE_API_SECRET: t-silent-test-1234/c-green-test-1234/exoscale/cert_webhook/s3_secret_key