Skip to content

[self-signed] workspace creation fails in release-2022.09.0 #13735

Closed
@Pothulapati

Description

@Pothulapati

Bug description

On a self-signed instance of GItpod (for example local-preview), The workspace creation fails with a CreateConfigError in Kubernetes. Digging more on that we see the following error in Kubernetes

/ # kubectl describe pod  | grep 2148
      NODE_EXTRA_CA_CERTS:              <set to the key 'f0f9c6ddcfb588904de6982b658e17a8cf7b9e3c108fd1380aa2f5d5dfed2148' in secret 'ws-9deee364-eedc-4361-b6b0-90daaa29e0a5'>  Optional: false
  Warning  Failed     7m46s (x12 over 10m)  kubelet            Error: couldn't find key f0f9c6ddcfb588904de6982b658e17a8cf7b9e3c108fd1380aa2f5d5dfed2148 in Secret default/ws-9deee364-eedc-4361-b6b0-90daaa29e0a5

This seems to because of NODE_EXTRA_CA_CERTS being marked as a protected secret but still not rightly loaded into the workspace secret as a key. The same can be confirmed by comparing the secret vs the workspace

Workspace ENV Var

      - name: VSX_REGISTRY_URL
        valueFrom:
          secretKeyRef:
            key: 6271376496bf05a98eb6f9231ef39c87d25a936de821916483e5755bf4dfbe1a
            name: ws-9deee364-eedc-4361-b6b0-90daaa29e0a5
      - name: THEIA_SUPERVISOR_TOKENS
        valueFrom:
          secretKeyRef:
            key: 3a3b612491764cccf7a5bccafc73031bb965cad1592bf600f2c3edca7c6e41bb
            name: ws-9deee364-eedc-4361-b6b0-90daaa29e0a5
      - name: GITPOD_INTERVAL
        value: "30000"
      - name: GITPOD_MEMORY
        value: "524"
      - name: NODE_EXTRA_CA_CERTS
        valueFrom:
          secretKeyRef:
            key: f0f9c6ddcfb588904de6982b658e17a8cf7b9e3c108fd1380aa2f5d5dfed2148
            name: ws-9deee364-eedc-4361-b6b0-90daaa29e0a5
      image: reg.preview.gitpod-self-hosted.com:20000/remote/9deee364-eedc-4361-b6b0-90daaa29e0a5

Secret

Name:         ws-9deee364-eedc-4361-b6b0-90daaa29e0a5
Namespace:    default
Labels:       app=gitpod
              component=workspace
              gitpod.io/workspaceClass=default
              gpwsman=true
              headless=false
              metaID=gitpodio-gitpodmicrosof-uzxl3qjx9yk
              owner=98885113-240a-4499-9923-85cad4ab64a9
              project=
              team=
              workspaceID=9deee364-eedc-4361-b6b0-90daaa29e0a5
              workspaceType=regular
Annotations:  <none>

Type:  Opaque

Data
====
6271376496bf05a98eb6f9231ef39c87d25a936de821916483e5755bf4dfbe1a:  47 bytes
initializer.composite.0.git:                                       40 bytes
3a3b612491764cccf7a5bccafc73031bb965cad1592bf600f2c3edca7c6e41bb:  1596 bytes

Steps to reproduce

Run

docker run -p 443:443 --privileged --name gitpod -it  --mount type=volume,source=gitpod,destination=/var/gitpod eu.gcr.io/gitpod-core-dev/build/local-preview:release-2022.09.0-lp.3

and see that workspace creation fails (while the image builds work)

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions