forked from s3gw-tech/s3gw-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
second draft for certificate management with cert-manager
Fixes: aquarist-labs/s3gw-tools#193 Signed-off-by: Giuseppe Baccini <giuseppe.baccini@suse.com>
- Loading branch information
Giuseppe Baccini
committed
Nov 29, 2022
1 parent
5107606
commit 4148a41
Showing
7 changed files
with
243 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{- if .Values.useCertManager }} | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: s3gw-cluster-ip | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
subject: | ||
countries: | ||
- DE | ||
localities: | ||
- Nuremberg | ||
organizationalUnits: | ||
- Aquarist Labs | ||
organizations: | ||
- SUSE | ||
provinces: | ||
- Bavaria | ||
commonName: '*.{{ .Values.serviceName }}.{{ .Release.Namespace }}.{{ .Values.privateDomain }}' | ||
dnsNames: | ||
- '{{ .Values.serviceName }}.{{ .Release.Namespace }}.{{ .Values.privateDomain }}' | ||
issuerRef: | ||
kind: Issuer | ||
name: s3gw-ca | ||
secretName: s3gw-cluster-ip-cert | ||
{{- end }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{{- if .Values.useCertManager }} | ||
--- | ||
# Self-signed issuer | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: s3gw-self-signed-issuer | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
selfSigned: {} | ||
--- | ||
# Private s3gw-ca issuer | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: s3gw-ca | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
ca: | ||
secretName: s3gw-ca-root | ||
--- | ||
# Issue a root certificate | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: s3gw-ca | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
commonName: s3gw-ca | ||
isCA: true | ||
issuerRef: | ||
kind: ClusterIssuer | ||
name: s3gw-self-signed-issuer | ||
privateKey: | ||
algorithm: ECDSA | ||
size: 256 | ||
secretName: s3gw-ca-root | ||
{{- end }} | ||
# Let's encrypt production issuer | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: s3gw-letsencrypt | ||
spec: | ||
acme: | ||
email: {{ .Values.email }} | ||
preferredChain: "" | ||
privateKeySecretRef: | ||
name: s3gw-letsencrypt | ||
server: https://acme-v02.api.letsencrypt.org/directory | ||
solvers: | ||
- http01: | ||
ingress: | ||
ingressTemplate: | ||
metadata: | ||
annotations: | ||
traefik.ingress.kubernetes.io/router.entrypoints: websecure | ||
traefik.ingress.kubernetes.io/router.tls: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{{- if not .Values.useCertManager }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: s3gw-ingress-cert | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{ include "s3gw.labels" . | indent 4 }} | ||
type: kubernetes.io/tls | ||
data: | ||
tls.crt: | | ||
{{ .Values.tls.publicDomain.crt }} | ||
tls.key: | | ||
{{ .Values.tls.publicDomain.key }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: s3gw-cluster-ip-cert | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{ include "s3gw.labels" . | indent 4 }} | ||
type: kubernetes.io/tls | ||
data: | ||
tls.crt: | | ||
{{ .Values.tls.privateDomain.crt }} | ||
tls.key: | | ||
{{ .Values.tls.privateDomain.key }} | ||
{{- if .Values.ui.enabled }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: s3gw-ui-ingress-cert | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{ include "s3gw.labels" . | indent 4 }} | ||
type: kubernetes.io/tls | ||
data: | ||
tls.crt: | | ||
{{ .Values.tls.ui.publicDomain.crt }} | ||
tls.key: | | ||
{{ .Values.tls.ui.publicDomain.key }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters