Skip to content

Deploying Cilium CNI: talosctl upgrade-k8s issue #82

@soupglasses

Description

@soupglasses

Documenation has an issue in its example in "Deploying Cilium CNI: Method 5 Using a Job" that will cause talosctl upgrade-k8s to fail with error:

Job.batch "cilium-install" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: {"app":"cilium-install"}: `selector` does not match template `labels`, spec.selector: Invalid value: null: field is immutable, spec.template: Invalid value: {"labels":{"app":"cilium-install"},"Spec":{"Volumes":null,"InitContainers":null,"Containers":[{"Name":"cilium-install","Image":"quay.io/cilium/cilium-cli:latest","Command":["cilium","install","--set","ipam.mode=kubernetes","--set","routingMode=native","--set","kubeProxyReplacement=true","--set","loadBalancer.mode=dsr","--set","loadBalancer.dsrDispatch=opt","--set","ipv4NativeRoutingCIDR=10.42.0.0/16","--set","securityContext.capabilities.ciliumAgent={CHOWN,KILL,NET_ADMIN,NET_RAW,IPC_LOCK,SYS_ADMIN,SYS_RESOURCE,DAC_OVERRIDE,FOWNER,SETGID,SETUID}","--set","securityContext.capabilities.cleanCiliumState={NET_ADMIN,SYS_ADMIN,SYS_RESOURCE}","--set","cgroup.autoMount.enabled=false","--set","cgroup.hostRoot=/sys/fs/cgroup","--set","k8sServiceHost=localhost","--set","k8sServicePort=7445"],"Args":null,"WorkingDir":"","Ports":null,"EnvFrom":null,"Env":[{"Name":"KUBERNETES_SERVICE_HOST","Value":"","ValueFrom":{"FieldRef":{"APIVersion":"v1","FieldPath":"status.podIP"},"ResourceFieldRef":null,"ConfigMapKeyRef":null,"SecretKeyRef":null,"FileKeyRef":null}},{"Name":"KUBERNETES_SERVICE_PORT","Value":"6443","ValueFrom":null}],"Resources":{"Limits":null,"Requests":null,"Claims":null},"ResizePolicy":null,"RestartPolicy":null,"RestartPolicyRules":null,"VolumeMounts":null,"VolumeDevices":null,"LivenessProbe":null,"ReadinessProbe":null,"StartupProbe":null,"Lifecycle":null,"TerminationMessagePath":"/dev/termination-log","TerminationMessagePolicy":"File","ImagePullPolicy":"Always","SecurityContext":null,"Stdin":false,"StdinOnce":false,"TTY":false}],"EphemeralContainers":null,"RestartPolicy":"OnFailure","TerminationGracePeriodSeconds":30,"ActiveDeadlineSeconds":null,"DNSPolicy":"ClusterFirst","NodeSelector":null,"ServiceAccountName":"cilium-install","AutomountServiceAccountToken":null,"NodeName":"","SecurityContext":{"HostNetwork":true,"HostPID":false,"HostIPC":false,"ShareProcessNamespace":null,"HostUsers":null,"SELinuxOptions":null,"WindowsOptions":null,"RunAsUser":null,"RunAsGroup":null,"RunAsNonRoot":null,"SupplementalGroups":null,"SupplementalGroupsPolicy":null,"FSGroup":null,"FSGroupChangePolicy":null,"Sysctls":null,"SeccompProfile":null,"AppArmorProfile":null,"SELinuxChangePolicy":null},"ImagePullSecrets":null,"Hostname":"","Subdomain":"","SetHostnameAsFQDN":null,"Affinity":{"NodeAffinity":{"RequiredDuringSchedulingIgnoredDuringExecution":{"NodeSelectorTerms":[{"MatchExpressions":[{"Key":"node-role.kubernetes.io/control-plane","Operator":"Exists","Values":null}],"MatchFields":null}]},"PreferredDuringSchedulingIgnoredDuringExecution":null},"PodAffinity":null,"PodAntiAffinity":null},"SchedulerName":"default-scheduler","Tolerations":[{"Key":"","Operator":"Exists","Value":"","Effect":"","TolerationSeconds":null},{"Key":"","Operator":"Exists","Value":"","Effect":"NoSchedule","TolerationSeconds":null},{"Key":"","Operator":"Exists","Value":"","Effect":"NoExecute","TolerationSeconds":null},{"Key":"","Operator":"Exists","Value":"","Effect":"PreferNoSchedule","TolerationSeconds":null},{"Key":"node-role.kubernetes.io/control-plane","Operator":"Exists","Value":"","Effect":"NoSchedule","TolerationSeconds":null},{"Key":"node-role.kubernetes.io/control-plane","Operator":"Exists","Value":"","Effect":"NoExecute","TolerationSeconds":null},{"Key":"node-role.kubernetes.io/control-plane","Operator":"Exists","Value":"","Effect":"PreferNoSchedule","TolerationSeconds":null}],"HostAliases":null,"PriorityClassName":"","Priority":null,"PreemptionPolicy":null,"DNSConfig":null,"ReadinessGates":null,"RuntimeClassName":null,"Overhead":null,"EnableServiceLinks":null,"TopologySpreadConstraints":null,"OS":null,"SchedulingGates":null,"ResourceClaims":null,"Resources":null,"HostnameOverride":null}}: field is immutable]

Related siderolabs/talos#11603

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions