Skip to content

Commit 989050b

Browse files
committed
Add app.kubernetes.io/component to preflight and google-cas-issuer
Signed-off-by: Maël Valais <[email protected]>
1 parent d925e7d commit 989050b

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ca.crt
2+
ca.key

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,36 @@ You can now click on "View clusters" to monitor your certificates. The
229229
documentation about the Jetstack Secure platform is available at
230230
<https://platform.jetstack.io/docs>.
231231

232+
Let us try with an example. We can create a CA issuer and sign a
233+
certificate that only lasts for 30 days:
234+
235+
```sh
236+
openssl genrsa -out ca.key 2048
237+
openssl req -x509 -new -nodes -key ca.key -subj "/CN=example" -out ca.crt
238+
kubectl create secret tls example --cert=ca.crt --key=ca.key
239+
kubectl apply -f- <<EOF
240+
apiVersion: cert-manager.io/v1
241+
kind: Issuer
242+
metadata:
243+
name: selfsigned-issuer
244+
spec:
245+
selfSigned: {}
246+
---
247+
apiVersion: cert-manager.io/v1alpha2
248+
kind: Certificate
249+
metadata:
250+
name: example
251+
spec:
252+
duration: 721h # very short time to live
253+
dnsNames:
254+
- example.com
255+
issuerRef:
256+
kind: Issuer
257+
name: letsencrypt-prod
258+
secretName: example-tls
259+
EOF
260+
```
261+
232262
### Step 3 (optional): set up the Google Certificate Authority Service
233263

234264
[Google Certificate Authority Service][] is a highly available, scalable Google Cloud

chart/jetstack-secure-gcm/charts/google-cas-issuer/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Selector labels
4848
{{- define "google-cas-issuer.selectorLabels" -}}
4949
app.kubernetes.io/name: {{ include "google-cas-issuer.name" . }}
5050
app.kubernetes.io/instance: {{ .Release.Name }}
51-
app.kubernetes.io/component: "controller"
51+
app.kubernetes.io/component: "google-cas-issuer"
5252
{{- end }}
5353

5454
{{/*

chart/jetstack-secure-gcm/charts/preflight/templates/_helpers.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Selector labels
4848
{{- define "preflight.selectorLabels" -}}
4949
app.kubernetes.io/name: {{ include "preflight.name" . }}
5050
app.kubernetes.io/instance: {{ .Release.Name }}
51+
app.kubernetes.io/component: preflight
5152
{{- end }}
5253

5354
{{/*

0 commit comments

Comments
 (0)