Allow override of registry and tag for Calico images

This commit is contained in:
Ciprian Hacman 2020-11-24 08:54:12 +02:00
parent dfa68a0327
commit 372fde0949
6 changed files with 34 additions and 12 deletions

View File

@ -2960,6 +2960,10 @@ spec:
description: PrometheusProcessMetricsEnabled enables Prometheus
process metrics collection
type: boolean
registry:
description: Version overrides the Calico container image
registry.
type: string
typhaPrometheusMetricsEnabled:
description: 'TyphaPrometheusMetricsEnabled enables Prometheus
metrics collection from Typha (default: false)'
@ -2975,6 +2979,10 @@ spec:
to deploy
format: int32
type: integer
version:
description: Version overrides the Calico container image
tag.
type: string
wireguardEnabled:
description: 'WireguardEnabled enables WireGuard encryption
for all on-the-wire pod-to-pod traffic (default: false)'

View File

@ -103,6 +103,11 @@ type FlannelNetworkingSpec struct {
// CalicoNetworkingSpec declares that we want Calico networking
type CalicoNetworkingSpec struct {
// Version overrides the Calico container image registry.
Registry string `json:"registry,omitempty"`
// Version overrides the Calico container image tag.
Version string `json:"version,omitempty"`
// BpfEnabled enables the eBPF dataplane mode.
BPFEnabled bool `json:"bpfEnabled,omitempty"`
// BPFExternalServiceMode controls how traffic from outside the cluster to NodePorts and ClusterIPs is handled.

View File

@ -103,6 +103,11 @@ type FlannelNetworkingSpec struct {
// CalicoNetworkingSpec declares that we want Calico networking
type CalicoNetworkingSpec struct {
// Version overrides the Calico container image registry.
Registry string `json:"registry,omitempty"`
// Version overrides the Calico container image tag.
Version string `json:"version,omitempty"`
// BpfEnabled enables the eBPF dataplane mode.
BPFEnabled bool `json:"bpfEnabled,omitempty"`
// BPFExternalServiceMode controls how traffic from outside the cluster to NodePorts and ClusterIPs is handled.

View File

@ -1345,6 +1345,8 @@ func Convert_kops_CNINetworkingSpec_To_v1alpha2_CNINetworkingSpec(in *kops.CNINe
}
func autoConvert_v1alpha2_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *CalicoNetworkingSpec, out *kops.CalicoNetworkingSpec, s conversion.Scope) error {
out.Registry = in.Registry
out.Version = in.Version
out.BPFEnabled = in.BPFEnabled
out.BPFExternalServiceMode = in.BPFExternalServiceMode
out.BPFKubeProxyIptablesCleanupEnabled = in.BPFKubeProxyIptablesCleanupEnabled
@ -1377,6 +1379,8 @@ func Convert_v1alpha2_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *Cali
}
func autoConvert_kops_CalicoNetworkingSpec_To_v1alpha2_CalicoNetworkingSpec(in *kops.CalicoNetworkingSpec, out *CalicoNetworkingSpec, s conversion.Scope) error {
out.Registry = in.Registry
out.Version = in.Version
out.BPFEnabled = in.BPFEnabled
out.BPFExternalServiceMode = in.BPFExternalServiceMode
out.BPFKubeProxyIptablesCleanupEnabled = in.BPFKubeProxyIptablesCleanupEnabled

View File

@ -36955,7 +36955,7 @@ spec:
securityContext:
fsGroup: 65534
containers:
- image: docker.io/calico/typha:v3.17.0
- image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/typha:{{ or .Networking.Calico.Version "v3.17.0" }}
name: calico-typha
ports:
- containerPort: 5473
@ -37072,7 +37072,7 @@ spec:
# It can be deleted if this is a fresh installation, or if you have already
# upgraded to use calico-ipam.
- name: upgrade-ipam
image: docker.io/calico/cni:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/cni:{{ or .Networking.Calico.Version "v3.17.0" }}
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
envFrom:
- configMapRef:
@ -37099,7 +37099,7 @@ spec:
# This container installs the CNI binaries
# and CNI network config file on each node.
- name: install-cni
image: docker.io/calico/cni:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/cni:{{ or .Networking.Calico.Version "v3.17.0" }}
command: ["/opt/cni/bin/install"]
envFrom:
- configMapRef:
@ -37140,7 +37140,7 @@ spec:
# Adds a Flex Volume Driver that creates a per-pod Unix Domain Socket to allow Dikastes
# to communicate with Felix over the Policy Sync API.
- name: flexvol-driver
image: docker.io/calico/pod2daemon-flexvol:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/pod2daemon-flexvol:{{ or .Networking.Calico.Version "v3.17.0" }}
volumeMounts:
- name: flexvol-driver-host
mountPath: /host/driver
@ -37151,7 +37151,7 @@ spec:
# container programs network policy and routes on each
# host.
- name: calico-node
image: docker.io/calico/node:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/node:{{ or .Networking.Calico.Version "v3.17.0" }}
envFrom:
- configMapRef:
# Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
@ -37415,7 +37415,7 @@ spec:
priorityClassName: system-cluster-critical
containers:
- name: calico-kube-controllers
image: docker.io/calico/kube-controllers:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/kube-controllers:{{ or .Networking.Calico.Version "v3.17.0" }}
env:
# Choose which controllers to run.
- name: ENABLED_CONTROLLERS

View File

@ -3625,7 +3625,7 @@ spec:
securityContext:
fsGroup: 65534
containers:
- image: docker.io/calico/typha:v3.17.0
- image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/typha:{{ or .Networking.Calico.Version "v3.17.0" }}
name: calico-typha
ports:
- containerPort: 5473
@ -3742,7 +3742,7 @@ spec:
# It can be deleted if this is a fresh installation, or if you have already
# upgraded to use calico-ipam.
- name: upgrade-ipam
image: docker.io/calico/cni:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/cni:{{ or .Networking.Calico.Version "v3.17.0" }}
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
envFrom:
- configMapRef:
@ -3769,7 +3769,7 @@ spec:
# This container installs the CNI binaries
# and CNI network config file on each node.
- name: install-cni
image: docker.io/calico/cni:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/cni:{{ or .Networking.Calico.Version "v3.17.0" }}
command: ["/opt/cni/bin/install"]
envFrom:
- configMapRef:
@ -3810,7 +3810,7 @@ spec:
# Adds a Flex Volume Driver that creates a per-pod Unix Domain Socket to allow Dikastes
# to communicate with Felix over the Policy Sync API.
- name: flexvol-driver
image: docker.io/calico/pod2daemon-flexvol:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/pod2daemon-flexvol:{{ or .Networking.Calico.Version "v3.17.0" }}
volumeMounts:
- name: flexvol-driver-host
mountPath: /host/driver
@ -3821,7 +3821,7 @@ spec:
# container programs network policy and routes on each
# host.
- name: calico-node
image: docker.io/calico/node:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/node:{{ or .Networking.Calico.Version "v3.17.0" }}
envFrom:
- configMapRef:
# Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
@ -4085,7 +4085,7 @@ spec:
priorityClassName: system-cluster-critical
containers:
- name: calico-kube-controllers
image: docker.io/calico/kube-controllers:v3.17.0
image: {{ or .Networking.Calico.Registry "docker.io" }}/calico/kube-controllers:{{ or .Networking.Calico.Version "v3.17.0" }}
env:
# Choose which controllers to run.
- name: ENABLED_CONTROLLERS