Add .Capabilities.APIVersions.Has "kmm.sigs.x-k8s.io/v1beta1"check to module loader related Helm templates

This commit is contained in:
M. Mert Yildiran
2023-08-11 21:49:01 +03:00
parent 1a0625d37c
commit a5fb7e0474
2 changed files with 4 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
{{ if .Capabilities.APIVersions.Has "kmm.sigs.x-k8s.io/v1beta1" }}
apiVersion: kmm.sigs.x-k8s.io/v1beta1
kind: Module
metadata:
@@ -24,3 +25,4 @@ spec:
- /opt/lib/modules/5.10.0-23-amd64/pf_ring.ko
selector:
beta.kubernetes.io/arch: amd64
{{- end }}

View File

@@ -1,3 +1,4 @@
{{ if .Capabilities.APIVersions.Has "kmm.sigs.x-k8s.io/v1beta1" }}
apiVersion: v1
kind: ConfigMap
metadata:
@@ -40,3 +41,4 @@ data:
COPY --from=builder /work/pfring/kernel/pf_ring.ko /opt/lib/modules/${KERNEL_VERSION}/
RUN depmod -b /opt ${KERNEL_VERSION}
{{- end }}