Skip to content

Commit

Permalink
fix(issuer): Add default value for IssuerSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
yyvess committed Jan 29, 2024
1 parent d446924 commit 088294b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions samples/ha/postgres-istio-values.cue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ values: {
"keycloak.myorg.com",
]
}
issuerCreate: true
jksCreate: true
networkPolicyCreate: true

Expand Down
12 changes: 7 additions & 5 deletions templates/config.cue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import (
service: {
annotations?: timoniv1.#Annotations
https: true | *false
port: *[if https {8443}, {8080}][0] | int & >0 & <=65535
port: *[if https {8443}, {8080}][0] | int & >0 & <=65535
}

// Pod optional settings.
Expand All @@ -105,6 +105,12 @@ import (
serviceAccountCreate: *false | bool
serviceAccount: corev1.#ServiceAccount

// Issuer used to generate certificate & jks
issuerCreate: *false | bool
issuer: issuerv1.#IssuerSpec | *{
selfSigned: {}
}

certificateCreate: *false | bool
// Web certificate
certificate: certv1.#CertificateSpec & {
Expand All @@ -121,10 +127,6 @@ import (
secretName: "\(metadata.name)-jks"
}

// Issuer used to generate certificate & jks
issuerCreate: *false | bool
issuer: issuerv1.#IssuerSpec

pdbCreate: bool | *(replicas > 1)
pdb: policyv1.#PodDisruptionBudgetSpec & {
minAvailable: *1 | int & >0 & <=65535
Expand Down
12 changes: 12 additions & 0 deletions test/postgres-istio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ spec:
name: keycloak-jks-pwd-d89b3236
secretName: keycloak-jks
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
app.kubernetes.io/managed-by: timoni
app.kubernetes.io/name: keycloak
app.kubernetes.io/version: 0.0.0-devel
name: keycloak
namespace: zel-test
spec:
selfSigned: {}
---
apiVersion: v1
kind: Service
metadata:
Expand Down

0 comments on commit 088294b

Please sign in to comment.