Comments (5)
Your securityContext
is invalid. None of the attributes you specified are allowed in a PodSecurityContext. These are only valid attributes for a (Container)SecurityContext, so you'll need to move your securityContext
inside your container definition.
from argo-cd.
Hi @artemus717 , thanks for raising this issue. I tried to reproduce this and my application gets in sync state inspite of using a security context. Here is the deployment manifest that I used:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: "nginx:1.16.0"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- ALL
privileged: true
readOnlyRootFilesystem: false
runAsNonRoot: false
runAsUser: 0
ports:
- containerPort: 80
from argo-cd.
If I am not wrong, securityContext
cannot be edited once a pod is created. Looking at the diff, looks like your pod is already present on the cluster and you are trying to modify the securityContext
. Can you share the Sync Error message?
Argo CD by default does a kubectl apply on the resource, therefore it could fail if the pod is already present on the cluster. You can change this behaviour using sync options. Probably, a manual sync with replace
and force
sync option selected, should fix it i.e it will delete and recreate the pod with new securityContext
.
from argo-cd.
Hi @svghadi Thanks for response. I tried delete deployment and sync again, but securityContext did not synced to online. And there are no error message in argocd-server, system calls response 200, but just no sync action.
I will try to remove deployment again and replace and force sync option.
from argo-cd.
@ChristianCiach Yes, you are correct, it works now.
@ChristianCiach @svghadi @nitishfy Thanks for you help.
from argo-cd.
Related Issues (20)
- Push e2e test results to codecov
- Use `grpc.NewClient` instead of `grpc.Dial` HOT 3
- Repo Server EOF errors when accessing cache HOT 1
- status.summary.images not updated on upgrading an image in Application
- labels in managedNamespaceMetadata not being added to namespace HOT 1
- ApplicationSet controller infinite renconcile loop and wasting CPU resources HOT 2
- ignoreDifference not works with app in app pattern HOT 1
- Argocd annotation in Trivy ClusterComplianceReport restricts the resource to Sync
- [ApplicationSet] scmProvider generator: webhook support for topic/label updates HOT 1
- ignoreApplicationDifferences in ApplicationSet does not work with two identical repos
- Extensions don't immediately get updated after upgrading the version
- Add user meta to build environment
- Make buttons in the UI looks more like clickable buttons rather than labels HOT 1
- Add a label explaining what filters are for in the left panel HOT 2
- Show a progress of a Sync in a workflow fashion and show what failed more clearly
- ApplicationSet with multiple sources for helm charts and values HOT 6
- Username and Password fields don't look like fields HOT 1
- Allow pre-builtin actions with custom action
- `argocd app sync` not working with `--label` option in multi-source apps HOT 1
- Arbitrary file access during archive extraction ("Zip Slip")
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argo-cd.