Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to update Pods in Kubernetes 1.19 #28

Closed
TonyBogdanov opened this issue Feb 23, 2021 · 2 comments
Closed

Failed to update Pods in Kubernetes 1.19 #28

TonyBogdanov opened this issue Feb 23, 2021 · 2 comments

Comments

@TonyBogdanov
Copy link

My cluster just got upgraded to 1.19 and since then the operator is throwing and error trying to update Pods' PodSpec.SecurityContext.SeccompProfile field as it's immutable.

Here's the full error:

{"level":"error","ts":"2021-02-23T10:26:26.380Z","logger":"kubebuilder.controller","msg":"Reconciler error","controller":"redis-controller","request":"cache/redis","error":"failed to update Pods: Pod \"redis-redis-0\" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)
core.PodSpec{
	... // 10 identical fields
	AutomountServiceAccountToken: nil,
	NodeName:                     \"gke-leadpoint-cpu-2ef04e66-ssc3\",
	SecurityContext: &core.PodSecurityContext{
		... // 11 identical fields
		FSGroupChangePolicy: nil,
		Sysctls:             nil,
-┬а		SeccompProfile:      nil,
+┬а		SeccompProfile:      &core.SeccompProfile{Type: \"RuntimeDefault\"},
	},
	ImagePullSecrets: nil,
	Hostname:         \"redis-redis-0\",
	... // 15 identical fields
}
; Pod \"redis-redis-2\" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)
core.PodSpec{
	... // 10 identical fields
	AutomountServiceAccountToken: nil,
	NodeName:                     \"gke-leadpoint-memory-2db8b3f6-oe3m\",
	SecurityContext: &core.PodSecurityContext{
		... // 11 identical fields
		FSGroupChangePolicy: nil,
		Sysctls:             nil,
-┬а		SeccompProfile:      nil,
+┬а		SeccompProfile:      &core.SeccompProfile{Type: \"RuntimeDefault\"},
	},
	ImagePullSecrets: nil,
	Hostname:         \"redis-redis-2\",
	... // 15 identical fields
}
; Pod \"redis-redis-1\" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)
core.PodSpec{
	... // 10 identical fields
	AutomountServiceAccountToken: nil,
	NodeName:                     \"gke-leadpoint-memory-2db8b3f6-no3n\",
	SecurityContext: &core.PodSecurityContext{
		... // 11 identical fields
		FSGroupChangePolicy: nil,
		Sysctls:             nil,
-┬а		SeccompProfile:      nil,
+┬а		SeccompProfile:      &core.SeccompProfile{Type: \"RuntimeDefault\"},
	},
	ImagePullSecrets: nil,
	Hostname:         \"redis-redis-1\",
	... // 15 identical fields
}
;","stacktrace":"github.com/amaizfinance/redis-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error
	vendor/github.com/go-logr/zapr/zapr.go:128
github.com/amaizfinance/redis-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:217
github.com/amaizfinance/redis-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
	vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158
github.com/amaizfinance/redis-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
github.com/amaizfinance/redis-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil
	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
github.com/amaizfinance/redis-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until
	vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
@maeb
Copy link

maeb commented Feb 23, 2021

Duplicate of #24. See comments.

@nrvnrvn
Copy link
Collaborator

nrvnrvn commented Sep 12, 2021

Resolved via 549d566

@nrvnrvn nrvnrvn closed this as completed Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants