Skip to content

Commit 284fe5c

Browse files
committed
feat: Support configuring minimum k8s version that Knative will accept
Fixes gh-50
1 parent b87d5c2 commit 284fe5c

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ The Knative Serving package has the following configurable properties.
104104
| `policies.include` | `false` | Whether to include the out-of-the-box Kyverno policies to validate and secure the package installation. |
105105
| `domain_name` | `""` | Domain name for Knative Services. It must be a valid DNS name. |
106106
| `ingress_issuer` | `""` | A reference to the ClusterIssuer to use if you want to enable autoTLS. |
107+
| `min_kubernetes_version` | `""` | The minimum Kubernetes version that this package will accept as valid. If not set, Knative Serving will accept the last 3 minor versions of Kubernetes. |
107108

108109
Settings for the Knative Serving workloads.
109110

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#@ load("@ytt:data", "data")
2+
#@ load("@ytt:overlay", "overlay")
3+
4+
#@overlay/match by=overlay.subset({"kind":"Deployment"}), expects="6+"
5+
---
6+
spec:
7+
template:
8+
spec:
9+
#@overlay/match missing_ok=True
10+
containers:
11+
#@overlay/match by=overlay.all
12+
- env:
13+
#@ if/end data.values.min_kubernetes_version != "":
14+
- name: KUBERNETES_MIN_VERSION
15+
value: #@ data.values.min_kubernetes_version

package/config/values-schema.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ domain_name: ""
1717
#@schema/examples ("Kadras private CA", "kadras-ca-issuer")
1818
ingress_issuer: ""
1919

20+
#@schema/desc "The minimum Kubernetes version that this package will accept as valid. If not set, Knative Serving will accept the last 3 minor versions of Kubernetes."
21+
min_kubernetes_version: ""
22+
2023
#@schema/desc "Settings for the Knative Serving workloads."
2124
workloads:
2225
activator:

test/integration/default/config/values.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ stringData:
88
values.yaml: |
99
domain_name: "127.0.0.1.sslip.io"
1010
ingress_issuer: "kadras-ca-issuer"
11+
min_kubernetes_version: "1.30.0"

0 commit comments

Comments
 (0)