-
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.
- Loading branch information
mhoshi-vm
committed
Dec 12, 2024
1 parent
7b099f5
commit cbff45b
Showing
2 changed files
with
26 additions
and
19 deletions.
There are no files selected for viewing
41 changes: 24 additions & 17 deletions
41
manifests/tpk8s-opinionated.tanzu.japan.com/10.0.0/secretgen/certificate.yaml
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 |
---|---|---|
@@ -1,43 +1,50 @@ | ||
#@ load("@ytt:data", "data") | ||
#@ if data.values.tp.ingress.self_signed_cert: | ||
--- | ||
apiVersion: secretgen.k14s.io/v1alpha1 | ||
kind: Certificate | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: root-ca-cert | ||
name: tp-root-issuer | ||
namespace: #@ data.values.tp.namespace | ||
annotations: | ||
kapp.k14s.io/change-group: "secrettemplate" | ||
spec: | ||
isCA: true | ||
selfSigned: {} | ||
--- | ||
apiVersion: secretgen.k14s.io/v1alpha1 | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: inter-ca-cert | ||
name: tp-cert | ||
namespace: #@ data.values.tp.namespace | ||
annotations: | ||
kapp.k14s.io/change-group: "secrettemplate" | ||
spec: | ||
caRef: | ||
name: root-ca-cert | ||
#! https://github.gwd.broadcom.net/TNZ/ensemble-self-managed/blob/master/installer/pkg/install/certificate_step.go#L59 | ||
isCA: true | ||
commonName: #@ data.values.tp.ingress.host | ||
alternativeNames: | ||
secretName: tp-cert | ||
dnsNames: | ||
- localhost | ||
- #@ data.values.tp.ingress.host | ||
- #@ "*." + data.values.tp.ingress.host | ||
issuerRef: | ||
name: tp-root-issuer | ||
kind: Issuer | ||
group: cert-manager.io | ||
privateKey: | ||
encoding: PKCS8 | ||
size: 4096 | ||
usages: | ||
- digital signature | ||
- key encipherment | ||
- cert sign | ||
- server auth | ||
#@ else: | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: inter-ca-cert | ||
name: tp-cert | ||
namespace: #@ data.values.tp.namespace | ||
annotations: | ||
kapp.k14s.io/change-group: "secrettemplate" | ||
type: Opaque | ||
stringData: | ||
crt.pem: #@ data.values.tp.ingress.certificate | ||
key.pem: #@ data.values.tp.ingress.privateKey | ||
tls.crt: #@ data.values.tp.ingress.certificate | ||
tls.key: #@ data.values.tp.ingress.privateKey | ||
#@ 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