Merge pull request #215 from vadorovsky/cilium-fix

cilium: Fix the chart, update to 1.11.1
pull/208/head
Michal Rostecki 2022-01-20 17:32:47 +01:00 committed by GitHub
commit b713100034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 47 additions and 283 deletions

View File

@ -15,14 +15,3 @@
{{/*
Render full image name from given values, e.g:
```
@@ -18,8 +26,9 @@
will return `quay.io/cilium/cilium:v1.10.1@abcdefgh`
*/}}
{{- define "cilium.image" -}}
+{{- $registry := include "system_default_registry" . -}}
{{- $digest := (.useDigest | default false) | ternary (printf "@%s" .digest) "" -}}
-{{- printf "%s:%s%s" .repository .tag $digest -}}
+{{- printf "%s%s:%s%s" $registry .repository .tag $digest -}}
{{- end -}}
{{/*

View File

@ -1,6 +1,42 @@
--- charts-original/templates/cilium-agent/daemonset.yaml
+++ charts/templates/cilium-agent/daemonset.yaml
@@ -390,6 +390,8 @@
@@ -70,7 +70,7 @@
{{- end }}
containers:
- name: cilium-agent
- image: {{ include "cilium.image" .Values.image | quote }}
+ image: "{{ template "system_default_registry" . }}{{ include "cilium.image" .Values.image }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.sleepAfterInit }}
command:
@@ -321,7 +321,7 @@
{{- end }}
{{- if .Values.monitor.enabled }}
- name: cilium-monitor
- image: {{ include "cilium.image" .Values.image | quote }}
+ image: "{{ template "system_default_registry" . }}{{ include "cilium.image" .Values.image }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["cilium"]
args:
@@ -348,7 +348,7 @@
# Required to mount cgroup2 filesystem on the underlying Kubernetes node.
# We use nsenter command with host's cgroup and mount namespaces enabled.
- name: mount-cgroup
- image: {{ include "cilium.image" .Values.image | quote }}
+ image: "{{ template "system_default_registry" . }}{{ include "cilium.image" .Values.image }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: CGROUP_ROOT
@@ -377,7 +377,7 @@
{{- end }}
{{- if and .Values.nodeinit.enabled .Values.nodeinit.bootstrapFile }}
- name: wait-for-node-init
- image: {{ include "cilium.image" .Values.image | quote }}
+ image: "{{ template "system_default_registry" . }}{{ include "cilium.image" .Values.image }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- sh
@@ -390,9 +390,11 @@
volumeMounts:
- name: cilium-bootstrap-file
mountPath: {{ .Values.nodeinit.bootstrapFile }}
@ -8,4 +44,8 @@
+ privileged: true
{{- end }}
- name: clean-cilium-state
image: {{ include "cilium.image" .Values.image | quote }}
- image: {{ include "cilium.image" .Values.image | quote }}
+ image: "{{ template "system_default_registry" . }}{{ include "cilium.image" .Values.image }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /init-container.sh

View File

@ -1,12 +0,0 @@
--- charts-original/templates/cilium-operator/_helpers.tpl
+++ charts/templates/cilium-operator/_helpers.tpl
@@ -26,7 +26,8 @@
Return cilium operator image
*/}}
{{- define "cilium.operator.image" -}}
+{{- $registry := include "system_default_registry" . }}
{{- $cloud := include "cilium.operator.cloud" . }}
{{- $imageDigest := include "cilium.operator.imageDigestName" . }}
-{{- printf "%s-%s%s:%s%s" .Values.operator.image.repository $cloud .Values.operator.image.suffix .Values.operator.image.tag $imageDigest -}}
+{{- printf "%s%s-%s%s:%s%s" $registry .Values.operator.image.repository $cloud .Values.operator.image.suffix .Values.operator.image.tag $imageDigest -}}
{{- end -}}

View File

@ -1,4 +1,4 @@
url: https://helm.cilium.io/cilium-1.11.0.tgz
url: https://helm.cilium.io/cilium-1.11.1.tgz
packageVersion: 01
releaseCandidateVersion: 00
# This package is meant to be consumed as a subchart of another package,

View File

@ -1,7 +1,7 @@
apiVersion: v1
name: rke2-cilium
description: eBPF-based Networking, Security, and Observability
version: 1.11.0
version: 1.11.1
kubeVersion: ">= 1.12.0-0"
home: https://cilium.io/
keywords:

View File

@ -1,253 +0,0 @@
{
"$schema": "http://json-schema.org/draft-09/schema",
"type": "object",
"properties": {
"cilium": {
"type": "object",
"properties": {
"azure": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"cni": {
"type": "object",
"properties": {
"chainingMode": {
"type": "string"
},
"customConf": {
"type": "boolean"
}
}
},
"eni": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"image": {
"type": "object",
"properties": {
"repository": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"required": ["repository", "tag" ]
},
"imagePullSecrets": {
"type": "array"
},
"ipam": {
"type": "object",
"properties": {
"mode": {
"type": "string"
}
}
},
"masquerade": {
"type": "boolean"
},
"nodeinit": {
"type": "object",
"properties": {
"image": {
"type": "object",
"properties": {
"repository": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"required": ["repository", "tag" ]
}
},
"required": ["image" ]
},
"operator": {
"type": "object",
"properties": {
"image": {
"type": "object",
"properties": {
"repository": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"required": ["repository", "tag" ]
}
},
"required": ["image" ]
},
"preflight": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"image": {
"type": "object",
"properties": {
"repository": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"required": ["repository", "tag" ]
}
}
},
"tunnel": {
"type": "string"
},
"ipv6": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
}
},
"required": ["image", "operator", "nodeinit" ]
},
"global": {
"type": "object",
"properties": {
"systemDefaultRegistry": {
"type": "string"
}
}
}
},
"required": ["cilium"],
"allOf": [
{ "$ref" : "#/$defs/azure-requires-config" },
{ "$ref" : "#/$defs/aws-requires-config" },
{ "$ref" : "#/$defs/azure-aws-are-exclusive" },
{ "$ref" : "#/$defs/preflight-requires-config" }
],
"$defs": {
"is-azure": {
"properties" : {
"cilium": {
"properties": {
"azure": {
"properties": {
"enabled": { "const": true }
}
}
}
}
}
},
"azure-requires-config" : {
"anyOf": [
{ "not": { "$ref": "#/$defs/is-azure" } },
{
"properties": {
"cilium": {
"properties": {
"masquerade": { "const": true },
"cni": {
"properties": {
"chainingMode": { "const": "generic-veth" },
"customConf": { "const": true },
"configMap": { "const": "cni-configuration"}
},
"required": [ "chainingMode", "customConf", "configMap" ]
}
},
"required": [ "cni" ]
}
}
}
]
},
"is-aws": {
"properties" : {
"cilium": {
"properties": {
"eni": { "const": true }
}
}
}
},
"aws-requires-config": {
"anyOf": [
{ "not": { "$ref": "#/$defs/is-aws" } },
{
"properties": {
"cilium": {
"properties": {
"tunnel": { "const": "disabled" },
"egressMasqueradeInterfaces": { "const": "eth0" },
"ipam": {
"properties": {
"mode": { "const": "eni" }
},
"required": [ "mode" ]
}
},
"required": [ "tunnel", "egressMasqueradeInterfaces", "ipam" ]
}
}
}
]
},
"azure-aws-are-exclusive": {
"not": {
"allOf": [
{ "$ref": "#/$defs/is-azure" },
{ "$ref": "#/$defs/is-aws" }
]
}
},
"is-preflight": {
"properties" : {
"cilium": {
"properties": {
"preflight": {
"properties": {
"enabled": { "const": true }
}
}
}
}
}
},
"preflight-requires-config" : {
"anyOf": [
{ "not": { "$ref": "#/$defs/is-preflight" } },
{
"properties": {
"cilium": {
"properties": {
"preflight": {
"required": [ "image" ]
}
}
}
}
}
]
}
}
}

View File

@ -5,12 +5,12 @@ cilium:
imagePullSecrets: []
image:
repository: rancher/mirrored-cilium-cilium
tag: v1.11.0
tag: v1.11.1
useDigest: false
operator:
image:
repository: rancher/mirrored-cilium-operator
tag: v1.11.0
tag: v1.11.1
useDigest: false
nodeinit:
image:
@ -21,7 +21,7 @@ cilium:
enabled: false
image:
repository: rancher/mirrored-cilium-cilium
tag: v1.11.0
tag: v1.11.1
useDigest: false
#