Skip to content

Commit 2302b4c

Browse files
committed
chore: add image pull policy and secret handling across components
1 parent 006c343 commit 2302b4c

18 files changed

+64
-24
lines changed

apis/offloading/v1beta1/vkoptionstemplate_types.go

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,23 @@ import (
2121

2222
// VkOptionsTemplateSpec defines the desired state of VkOptionsTemplate.
2323
type VkOptionsTemplateSpec struct {
24-
CreateNode bool `json:"createNode"`
25-
DisableNetworkCheck bool `json:"disableNetworkCheck"`
26-
ContainerImage string `json:"containerImage"`
27-
MetricsEnabled bool `json:"metricsEnabled"`
28-
MetricsAddress string `json:"metricsAddress,omitempty"`
29-
LabelsNotReflected []string `json:"labelsNotReflected,omitempty"`
30-
AnnotationsNotReflected []string `json:"annotationsNotReflected,omitempty"`
31-
ReflectorsConfig map[string]ReflectorConfig `json:"reflectorsConfig,omitempty"`
32-
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
33-
ExtraArgs []string `json:"extraArgs,omitempty"`
34-
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
35-
ExtraLabels map[string]string `json:"extraLabels,omitempty"`
36-
NodeExtraAnnotations map[string]string `json:"nodeExtraAnnotations,omitempty"`
37-
NodeExtraLabels map[string]string `json:"nodeExtraLabels,omitempty"`
38-
Replicas *int32 `json:"replicas,omitempty"`
24+
CreateNode bool `json:"createNode"`
25+
DisableNetworkCheck bool `json:"disableNetworkCheck"`
26+
ContainerImage string `json:"containerImage"`
27+
MetricsEnabled bool `json:"metricsEnabled"`
28+
MetricsAddress string `json:"metricsAddress,omitempty"`
29+
LabelsNotReflected []string `json:"labelsNotReflected,omitempty"`
30+
AnnotationsNotReflected []string `json:"annotationsNotReflected,omitempty"`
31+
ReflectorsConfig map[string]ReflectorConfig `json:"reflectorsConfig,omitempty"`
32+
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
33+
ExtraArgs []string `json:"extraArgs,omitempty"`
34+
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`
35+
ExtraLabels map[string]string `json:"extraLabels,omitempty"`
36+
NodeExtraAnnotations map[string]string `json:"nodeExtraAnnotations,omitempty"`
37+
NodeExtraLabels map[string]string `json:"nodeExtraLabels,omitempty"`
38+
Replicas *int32 `json:"replicas,omitempty"`
39+
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
40+
PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"`
3941
}
4042

4143
// ReflectorConfig contains configuration parameters of the reflector.

deployments/liqo/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
| discovery.config.clusterID | string | `""` | Specify an unique ID for your cluster. This ID is used to identify your cluster in the peering process. |
5050
| discovery.config.clusterLabels | object | `{}` | A set of labels that characterizes the local cluster when exposed remotely as a virtual node. It is suggested to specify the distinguishing characteristics that may be used to decide whether to offload pods on this cluster. |
5151
| fullnameOverride | string | `""` | Override the standard full name used by Helm and associated to Kubernetes/Liqo resources. |
52+
| imagePullSecrets | list | `[]` | Image pull secrets for all Liqo containers |
5253
| ipam.external.enabled | bool | `false` | Use an external IPAM to allocate the IP addresses for the pods. Enabling it will disable the internal IPAM. |
5354
| ipam.external.url | string | `""` | The URL of the external IPAM. |
5455
| ipam.externalCIDR | string | `"10.70.0.0/16"` | The subnet used for the external CIDR. |
@@ -164,7 +165,7 @@
164165
| proxy.replicas | int | `1` | Set the number of replicas for the proxy deployments |
165166
| proxy.service.annotations | object | `{}` | |
166167
| proxy.service.type | string | `"ClusterIP"` | |
167-
| pullPolicy | string | `"IfNotPresent"` | The pullPolicy for liqo pods. |
168+
| pullPolicy | string | `"IfNotPresent"` | Image pull policy for all Liqo containers |
168169
| requirements.kernel.enabled | bool | `true` | Enable/Disable the kernel requirements check. |
169170
| storage.enabled | bool | `true` | Enable/Disable the liqo virtual storage class on the local cluster. You will be able to offload your persistent volumes, while other clusters will be able to schedule their persistent workloads on the current cluster. |
170171
| storage.realStorageClassName | string | `""` | Name of the real storage class to use in the local cluster. |

deployments/liqo/templates/_helpers.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,13 @@ Get the Container security context
240240
{{- define "liqo.containerSecurityContext" -}}
241241
allowPrivilegeEscalation: false
242242
{{- end -}}
243+
244+
{{/*
245+
Get the image pull secrets
246+
*/}}
247+
{{- define "liqo.imagePullSecrets" -}}
248+
{{- if .Values.imagePullSecrets }}
249+
imagePullSecrets:
250+
{{- toYaml .Values.imagePullSecrets | nindent 0 }}
251+
{{- end -}}
252+
{{- end -}}

deployments/liqo/templates/liqo-controller-manager-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ spec:
3939
securityContext:
4040
{{- include "liqo.podSecurityContext" . | nindent 8 }}
4141
serviceAccountName: {{ include "liqo.prefixedName" $ctrlManagerConfig }}
42+
{{- include "liqo.imagePullSecrets" . | nindent 6 }}
4243
containers:
4344
- image: {{ .Values.controllerManager.image.name }}{{ include "liqo.suffix" $ctrlManagerConfig }}:{{ include "liqo.version" $ctrlManagerConfig }}
4445
imagePullPolicy: {{ .Values.pullPolicy }}

deployments/liqo/templates/liqo-crd-replicator-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ spec:
2626
securityContext:
2727
{{- include "liqo.podSecurityContext" . | nindent 8 }}
2828
serviceAccountName: {{ include "liqo.prefixedName" $crdReplicatorConfig }}
29+
{{- include "liqo.imagePullSecrets" . | nindent 6 }}
2930
containers:
3031
- image: {{ .Values.crdReplicator.image.name }}{{ include "liqo.suffix" $crdReplicatorConfig }}:{{ include "liqo.version" $crdReplicatorConfig }}
3132
imagePullPolicy: {{ .Values.pullPolicy }}

deployments/liqo/templates/liqo-fabric-daemonset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ spec:
3838
{{- toYaml .Values.networking.fabric.tolerations | nindent 8 }}
3939
{{- end }}
4040
serviceAccountName: {{ include "liqo.prefixedName" $fabricConfig }}
41+
{{- include "liqo.imagePullSecrets" . | nindent 6 }}
4142
containers:
4243
- image: {{ .Values.networking.fabric.image.name }}{{ include "liqo.suffix" $fabricConfig }}:{{ include "liqo.version" $fabricConfig }}
4344
imagePullPolicy: {{ .Values.pullPolicy }}

deployments/liqo/templates/liqo-ipam-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ spec:
2929
securityContext:
3030
{{- include "liqo.podSecurityContext" . | nindent 8 }}
3131
serviceAccountName: {{ include "liqo.prefixedName" $ipamConfig }}
32+
{{- include "liqo.imagePullSecrets" . | nindent 6 }}
3233
containers:
3334
- image: {{ .Values.ipam.internal.image.name }}{{ include "liqo.suffix" $ipamConfig }}:{{ include "liqo.version" $ipamConfig }}
3435
imagePullPolicy: {{ .Values.pullPolicy }}

deployments/liqo/templates/liqo-metric-agent-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ spec:
3131
securityContext:
3232
{{- include "liqo.podSecurityContext" . | nindent 8 }}
3333
serviceAccountName: {{ include "liqo.prefixedName" $metricConfig }}
34+
{{- include "liqo.imagePullSecrets" . | nindent 6 }}
3435
initContainers:
3536
- name: {{ $certConfig.name }}
3637
imagePullPolicy: {{ .Values.pullPolicy }}

deployments/liqo/templates/liqo-proxy-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ spec:
2727
spec:
2828
securityContext:
2929
{{- include "liqo.podSecurityContext" . | nindent 8 }}
30+
{{- include "liqo.imagePullSecrets" . | nindent 6 }}
3031
containers:
3132
- image: {{ .Values.proxy.image.name }}{{ include "liqo.suffix" $proxyConfig }}:{{ include "liqo.version" $proxyConfig }}
3233
imagePullPolicy: {{ .Values.pullPolicy }}

deployments/liqo/templates/liqo-telemetry-cronjob.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ spec:
3434
securityContext:
3535
{{- include "liqo.podSecurityContext" . | nindent 12 }}
3636
serviceAccountName: {{ include "liqo.prefixedName" $telemetryCronConfig }}
37+
{{- include "liqo.imagePullSecrets" . | nindent 10 }}
3738
restartPolicy: Never
3839
containers:
3940
- image: {{ .Values.telemetry.image.name }}{{ include "liqo.suffix" $telemetryCronConfig }}:{{ include "liqo.version" $telemetryCronConfig }}

0 commit comments

Comments
 (0)