diff --git a/cluster/cert-manager/cert-patches.yaml b/cluster/cert-manager/cert-patches.yaml deleted file mode 100644 index 0519ecb..0000000 --- a/cluster/cert-manager/cert-patches.yaml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/cluster/cert-manager/templates/certs/api-server.yaml b/cluster/cert-manager/templates/certs/api-server.yaml new file mode 100644 index 0000000..f12bb8a --- /dev/null +++ b/cluster/cert-manager/templates/certs/api-server.yaml @@ -0,0 +1,30 @@ +{{- if and .Values.le.prod.enabled .Values.le.apiCert.enabled -}} +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: okd-api + namespace: openshift-config + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true +spec: + dnsNames: + - api.{{ .Values.cluster_name }}.{{ .Values.base_domain }} + issuerRef: + group: cert-manager.io + kind: ClusterIssuer + name: le-prod + secretName: okd-api +--- +apiVersion: config.openshift.io/v1 +kind: APIServer +metadata: + name: cluster +spec: + servingCerts: + namedCertificates: + - names: + - api.{{ .Values.cluster_name }}.{{ .Values.base_domain }} + servingCertificate: + name: okd-api +{{- end }} diff --git a/cluster/cert-manager/templates/certs/router.yaml b/cluster/cert-manager/templates/certs/router.yaml new file mode 100644 index 0000000..53ac652 --- /dev/null +++ b/cluster/cert-manager/templates/certs/router.yaml @@ -0,0 +1,29 @@ +{{- if and .Values.le.prod.enabled .Values.le.routerCert.enabled -}} +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: router-cert + namespace: openshift-ingress + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true +spec: + commonName: apps.{{ .Values.cluster_name }}.{{ .Values.base_domain }} + dnsNames: + - apps.{{ .Values.cluster_name }}.{{ .Values.base_domain }} + - "*.apps.{{ .Values.cluster_name }}.{{ .Values.base_domain }}" + issuerRef: + group: cert-manager.io + kind: ClusterIssuer + name: le-prod + secretName: router-cert +--- +apiVersion: operator.openshift.io/v1 +kind: IngressController +metadata: + name: default + namespace: openshift-ingress-operator +spec: + defaultCertificate: + name: router-cert +{{- end }} diff --git a/cluster/cert-manager/values-hub.yaml b/cluster/cert-manager/values-hub.yaml index 2edcfb8..ef43672 100644 --- a/cluster/cert-manager/values-hub.yaml +++ b/cluster/cert-manager/values-hub.yaml @@ -24,7 +24,6 @@ ca: -----END PRIVATE KEY----- - le: prod: enabled: true @@ -35,7 +34,7 @@ le: apiCert: enabled: false routerCert: - enabled: false + enabled: true preferredChain: "" email: ryan.blundon@protonmail.com solvers: @@ -56,4 +55,4 @@ le: # secret-access-key: cluster_name: hub -base_domain: mklabs.cloud \ No newline at end of file +base_domain: int.mk-labs.cloud \ No newline at end of file diff --git a/cluster/cert-manager/base/cloudflare-secret-eso.yaml b/cluster/temp/base/cloudflare-secret-eso.yaml similarity index 100% rename from cluster/cert-manager/base/cloudflare-secret-eso.yaml rename to cluster/temp/base/cloudflare-secret-eso.yaml diff --git a/cluster/cert-manager/base/clusterissuers.yaml b/cluster/temp/base/clusterissuers.yaml similarity index 100% rename from cluster/cert-manager/base/clusterissuers.yaml rename to cluster/temp/base/clusterissuers.yaml diff --git a/cluster/cert-manager/base/kustomization.yaml b/cluster/temp/base/kustomization.yaml similarity index 100% rename from cluster/cert-manager/base/kustomization.yaml rename to cluster/temp/base/kustomization.yaml diff --git a/cluster/cert-manager/base/monitoring.yaml b/cluster/temp/base/monitoring.yaml similarity index 100% rename from cluster/cert-manager/base/monitoring.yaml rename to cluster/temp/base/monitoring.yaml diff --git a/cluster/cert-manager/base/namespace.yaml b/cluster/temp/base/namespace.yaml similarity index 100% rename from cluster/cert-manager/base/namespace.yaml rename to cluster/temp/base/namespace.yaml diff --git a/cluster/cert-manager/base/operatorgroup.yaml b/cluster/temp/base/operatorgroup.yaml similarity index 100% rename from cluster/cert-manager/base/operatorgroup.yaml rename to cluster/temp/base/operatorgroup.yaml diff --git a/cluster/cert-manager/base/split-horizon-patch.yaml b/cluster/temp/base/split-horizon-patch.yaml similarity index 100% rename from cluster/cert-manager/base/split-horizon-patch.yaml rename to cluster/temp/base/split-horizon-patch.yaml diff --git a/cluster/cert-manager/base/subscription.yaml b/cluster/temp/base/subscription.yaml similarity index 100% rename from cluster/cert-manager/base/subscription.yaml rename to cluster/temp/base/subscription.yaml diff --git a/cluster/cert-manager/overlays/hub/api-ingress.yaml b/cluster/temp/overlays/hub/api-ingress.yaml similarity index 100% rename from cluster/cert-manager/overlays/hub/api-ingress.yaml rename to cluster/temp/overlays/hub/api-ingress.yaml diff --git a/cluster/cert-manager/overlays/hub/apiserver-cert-config.yaml b/cluster/temp/overlays/hub/apiserver-cert-config.yaml similarity index 100% rename from cluster/cert-manager/overlays/hub/apiserver-cert-config.yaml rename to cluster/temp/overlays/hub/apiserver-cert-config.yaml diff --git a/cluster/cert-manager/overlays/hub/ingress-controller-cert-config.yaml b/cluster/temp/overlays/hub/ingress-controller-cert-config.yaml similarity index 100% rename from cluster/cert-manager/overlays/hub/ingress-controller-cert-config.yaml rename to cluster/temp/overlays/hub/ingress-controller-cert-config.yaml diff --git a/cluster/cert-manager/overlays/hub/kustomization.yaml b/cluster/temp/overlays/hub/kustomization.yaml similarity index 100% rename from cluster/cert-manager/overlays/hub/kustomization.yaml rename to cluster/temp/overlays/hub/kustomization.yaml