Skip to content

Commit

Permalink
refactor(certificate): move certificate config from ingress to certif…
Browse files Browse the repository at this point in the history
…icate (#18392)
  • Loading branch information
hongbo-miao authored Jul 28, 2024
1 parent 11fcedd commit fa096d9
Show file tree
Hide file tree
Showing 32 changed files with 140 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ metadata:
# https://doc.traefik.io/traefik/routing/providers/kubernetes-ingress/#on-ingress
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
# https://letsencrypt.org/certificates
cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
cert-manager.io/private-key-algorithm: ECDSA
cert-manager.io/private-key-size: "384"
cert-manager.io/private-key-rotation-policy: Always
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-airbyte
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-airbyte.internal.hongbomiao.com
secretName: production-hm-airbyte-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: production-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-airbyte
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-airbyte.internal.hongbomiao.com
secretName: staging-hm-airbyte-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: staging-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ metadata:
traefik.ingress.kubernetes.io/router.tls: "true"
# https://kubernetes-sigs.github.io/external-dns/latest/annotations/annotations
external-dns.alpha.kubernetes.io/hostname: hm-akhq.internal.hongbomiao.com
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
# https://letsencrypt.org/certificates
cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
cert-manager.io/private-key-algorithm: ECDSA
cert-manager.io/private-key-size: "384"
cert-manager.io/private-key-rotation-policy: Always
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-akhq
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-akhq.internal.hongbomiao.com
secretName: production-hm-akhq-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: production-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-akhq
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-akhq.internal.hongbomiao.com
secretName: staging-hm-akhq-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: staging-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ metadata:
traefik.ingress.kubernetes.io/router.tls: "true"
# https://kubernetes-sigs.github.io/external-dns/latest/annotations/annotations
external-dns.alpha.kubernetes.io/hostname: hm-argo-cd.internal.hongbomiao.com
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
# https://letsencrypt.org/certificates
cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
cert-manager.io/private-key-algorithm: ECDSA
cert-manager.io/private-key-size: "384"
cert-manager.io/private-key-rotation-policy: Always
labels:
app.kubernetes.io/name: hm-argo-cd-ingress
app.kubernetes.io/part-of: production-hm-argo-cd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -12,3 +13,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: production-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -12,3 +13,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: staging-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/tutorials/zerossl/zerossl/#cluster-issuer
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/tutorials/zerossl/zerossl/#cluster-issuer
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ metadata:
traefik.ingress.kubernetes.io/router.tls: "true"
# https://kubernetes-sigs.github.io/external-dns/latest/annotations/annotations
external-dns.alpha.kubernetes.io/hostname: hm-kafbat-ui.internal.hongbomiao.com
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
# https://letsencrypt.org/certificates
cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
cert-manager.io/private-key-algorithm: ECDSA
cert-manager.io/private-key-size: "384"
cert-manager.io/private-key-rotation-policy: Always
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-kafbat-ui
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-kafbat-ui.internal.hongbomiao.com
secretName: production-hm-kafbat-ui-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: production-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-kafbat-ui
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-kafbat-ui.internal.hongbomiao.com
secretName: staging-hm-kafbat-ui-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: staging-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ metadata:
traefik.ingress.kubernetes.io/router.tls: "true"
# https://kubernetes-sigs.github.io/external-dns/latest/annotations/annotations
external-dns.alpha.kubernetes.io/hostname: hm-mlflow.internal.hongbomiao.com
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
# https://letsencrypt.org/certificates
cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
cert-manager.io/private-key-algorithm: ECDSA
cert-manager.io/private-key-size: "384"
cert-manager.io/private-key-rotation-policy: Always
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-mlflow
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-mlflow.internal.hongbomiao.com
secretName: production-hm-mlflow-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: production-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-mlflow
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-mlflow.internal.hongbomiao.com
secretName: staging-hm-mlflow-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: staging-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ metadata:
traefik.ingress.kubernetes.io/router.tls: "true"
# https://kubernetes-sigs.github.io/external-dns/latest/annotations/annotations
external-dns.alpha.kubernetes.io/hostname: hm-netdata.internal.hongbomiao.com
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
# https://letsencrypt.org/certificates
cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
cert-manager.io/private-key-algorithm: ECDSA
cert-manager.io/private-key-size: "384"
cert-manager.io/private-key-rotation-policy: Always
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-netdata
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-netdata.internal.hongbomiao.com
secretName: production-hm-netdata-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: production-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-netdata
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-netdata.internal.hongbomiao.com
secretName: staging-hm-netdata-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: staging-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ metadata:
# https://doc.traefik.io/traefik/routing/providers/kubernetes-ingress/#on-ingress
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
# https://letsencrypt.org/certificates
cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
cert-manager.io/private-key-algorithm: ECDSA
cert-manager.io/private-key-size: "384"
cert-manager.io/private-key-rotation-policy: Always
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://cert-manager.io/docs/usage/certificate
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -6,7 +7,7 @@ metadata:
namespace: production-hm-opencost
annotations:
# https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook: PreSync
spec:
commonName: hm-opencost.internal.hongbomiao.com
secretName: production-hm-opencost-certificate
Expand All @@ -15,3 +16,8 @@ spec:
issuerRef:
kind: ClusterIssuer
name: production-lets-encrypt-cluster-issuer
# https://letsencrypt.org/certificates
privateKey:
algorithm: ECDSA
size: 384
rotationPolicy: Always
Loading

0 comments on commit fa096d9

Please sign in to comment.