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

fix(server): Update argo-server crt/key owner #4750

Merged
merged 1 commit into from Dec 17, 2020
Merged

fix(server): Update argo-server crt/key owner #4750

merged 1 commit into from Dec 17, 2020

Conversation

dtaniwaki
Copy link
Member

Checklist:

The self-signed key bundled in the argocli image cannot be used.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: argo-server
spec:
  selector:
    matchLabels:
      app: argo-server
  template:
    metadata:
      labels:
        app: argo-server
    spec:
      serviceAccountName: argo-server
      containers:
      - name: argo-server
        image: argoproj/argocli:v2.11.8
        securityContext:
          capabilities:
            drop:
              - ALL
        args:
        - server
        - --configmap
        - argo-server-cm
        - --auth-mode
        - sso
        - --secure
        ports:
        - name: web
          containerPort: 2746
        readinessProbe:
          httpGet:
            port: 2746
            scheme: HTTP
            path: /
          initialDelaySeconds: 10
          periodSeconds: 20
        volumeMounts:
        - mountPath: /tmp
          name: tmp
      volumes:
      - name: tmp
        emptyDir: { }
      securityContext:
        runAsUser: 8737 # argo UID
        runAsGroup: 8737 # argo UID
      nodeSelector:
        kubernetes.io/os: linux

Here's the log.

$ k logs argo-server-6dd9dc9cbd-8pqm8
time="2020-12-16T00:38:54Z" level=info authModes="[sso]" baseHRef=/ managedNamespace= namespace=argo secure=true
time="2020-12-16T00:38:54Z" level=fatal msg="open argo-server.key: permission denied"

Signed-off-by: Daisuke Taniwaki <daisuketaniwaki@gmail.com>
@alexec alexec changed the title Update argo-server crt/key owner fix(server): Update argo-server crt/key owner Dec 16, 2020
@alexec
Copy link
Contributor

alexec commented Dec 16, 2020

We've not seen this problem, which is odd.

@alexec
Copy link
Contributor

alexec commented Dec 16, 2020

@dtaniwaki are you doubly sure this is a problem? How come we can execute argo if it is ?

@dtaniwaki
Copy link
Member Author

I signed off the commit just 1 second before your approval, but the code change is the same.

@dtaniwaki
Copy link
Member Author

dtaniwaki commented Dec 16, 2020

Hmm... It's a problem in my company cluster which is very strict and force non-root. Let me try it in minikube just in case.

@dtaniwaki
Copy link
Member Author

dtaniwaki commented Dec 16, 2020

I found it's reproducible in my minikube. Maybe, you miss the security context and your pod is running as root?

@dtaniwaki
Copy link
Member Author

dtaniwaki commented Dec 16, 2020

However, I guess this change affects your currently working environment because the root user will not be able to read the argo-server.key.

@alexec
Copy link
Contributor

alexec commented Dec 16, 2020

v2.11 does not have runAsNonRoot:

https://github.com/argoproj/argo/blob/release-2.11/Dockerfile

@alexec
Copy link
Contributor

alexec commented Dec 16, 2020

v2.12 does, but this is not released yet.

@alexec alexec merged commit aed25fe into argoproj:master Dec 17, 2020
@alexec
Copy link
Contributor

alexec commented Dec 17, 2020

@simster7 @sarabala1979 v2.12.0 Argo Server is unusable because the server cannot read its keys. I've just merged this PR, but we need v2.12.1.

@simster7
Copy link
Member

@alexec Ill make a new release tonight

simster7 pushed a commit that referenced this pull request Dec 18, 2020
Signed-off-by: Daisuke Taniwaki <daisuketaniwaki@gmail.com>
@simster7 simster7 mentioned this pull request Jan 4, 2021
21 tasks
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

Successfully merging this pull request may close these issues.

None yet

3 participants