Closed Yinabled closed 3 years ago
@Yinabled can you confirm if 8.0.1
fixed this issue?
@thesuperzapper Yes, this worked like a charm. Thanks a bunch!
@thesuperzapper It appears this exact error has reappeared in tag airflow-8.0.9, it is being caused by a new docker image tag being passed. Utilising Terraform
Error: cannot patch "airflow-upgrade-db" with kind Job: Job.batch "airflow-upgrade-db" is invalid: spec.template: Invalid value: core.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"app":"airflow", "chart":"airflow-8.0.9", "component":"jobs", "controller-uid":"57f2d360-ba36-4a9b-bf12-8a3127d28213", "heritage":"Helm", "job-name":"airflow-upgrade-db", "release":"airflow"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:core.PodSpec{Volumes:[]core.Volume(nil), InitContainers:[]core.Container{core.Container{Name:"check-db", Image:"digitalmaas/airflow-core:6a97d81d581c19cf870b1130b3b38a3a20b1682e", Command:[]string{"/usr/bin/dumb-init", "--"}, Args:[]string{"bash", "-c", "exec timeout 60s airflow db check"}, WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource{core.EnvFromSource{Prefix:"", ConfigMapRef:(*core.ConfigMapEnvSource)(nil), SecretRef:(*core.SecretEnvSource)(0xc009d238c0)}}, Env:[]core.EnvVar{core.EnvVar{Name:"DATABASE_PASSWORD", Value:"", ValueFrom:(*core.EnvVarSource)(0xc009d23920)}, core.EnvVar{Name:"REDIS_PASSWORD", Value:"", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"PIP_NO_BINARY", Value:"multidict,yarl", ValueFrom:(*core.EnvVarSource)(nil)}}, Resources:core.ResourceRequirements{Limits:core.ResourceList(nil), Requests:core.ResourceList(nil)}, VolumeMounts:[]core.VolumeMount(nil), VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), StartupProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(0xc005bbc660), Stdin:false, StdinOnce:false, TTY:false}}, Containers:[]core.Container{core.Container{Name:"upgrade-db", Image:"digitalmaas/airflow-core:6a97d81d581c19cf870b1130b3b38a3a20b1682e", Command:[]string{"/usr/bin/dumb-init", "--"}, Args:[]string{"bash", "-c", "exec airflow db upgrade"}, WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource{core.EnvFromSource{Prefix:"", ConfigMapRef:(*core.ConfigMapEnvSource)(nil), SecretRef:(*core.SecretEnvSource)(0xc009d23aa0)}}, Env:[]core.EnvVar{core.EnvVar{Name:"DATABASE_PASSWORD", Value:"", ValueFrom:(*core.EnvVarSource)(0xc009d23ae0)}, core.EnvVar{Name:"REDIS_PASSWORD", Value:"", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"PIP_NO_BINARY", Value:"multidict,yarl", ValueFrom:(*core.EnvVarSource)(nil)}}, Resources:core.ResourceRequirements{Limits:core.ResourceList(nil), Requests:core.ResourceList(nil)}, VolumeMounts:[]core.VolumeMount(nil), VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), StartupProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(0xc005bbc780), Stdin:false, StdinOnce:false, TTY:false}}, EphemeralContainers:[]core.EphemeralContainer(nil), RestartPolicy:"OnFailure", TerminationGracePeriodSeconds:(*int64)(0xc00aa48660), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", SecurityContext:(*core.PodSecurityContext)(0xc014d13400), ImagePullSecrets:[]core.LocalObjectReference{core.LocalObjectReference{Name:"dockerhub"}}, Hostname:"", Subdomain:"", SetHostnameAsFQDN:(*bool)(nil), Affinity:(*core.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]core.Toleration(nil), HostAliases:[]core.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil), PreemptionPolicy:(*core.PreemptionPolicy)(nil), DNSConfig:(*core.PodDNSConfig)(nil), ReadinessGates:[]core.PodReadinessGate(nil), RuntimeClassName:(*string)(nil), Overhead:core.ResourceList(nil), EnableServiceLinks:(*bool)(nil), TopologySpreadConstraints:[]core.TopologySpreadConstraint(nil)}}: field is immutable
on airflow.tf line 11, in resource "helm_release" "airflow":
11: resource "helm_release" "airflow" {
Releasing state lock. This may take a few moments...
@inventionlabsSydney are you using helmWait=true
?
Because if not, helm should be successfully deleting any existing airflow-upgrade-db
job before it tries to create a new one.
Hi @thesuperzapper ,
I am using helmWait=true
is this a problem?
@Yinabled @inventionlabsSydney this issue should no longer happen after version 8.4.0 of the chart!
What is the bug?
When trying to modify our Airflow deployment using the latest chart via Terraform, we consistently run into the following error:
What are your Helm values?
The values that we merge with
values.yaml
via Terraform are as follows:What is your Kubernetes Version?:
What is your Helm version?: