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

[installer]: config detects shiftfs and containerd values #12683

Merged
merged 2 commits into from
Sep 12, 2022

Conversation

mrsimonemms
Copy link
Contributor

@mrsimonemms mrsimonemms commented Sep 6, 2022

Description

This creates two new commands - config cluster shiftfs and config files containerd - designed to autodetect whether ShiftFS is supported and the location of the containerd files.

The ShiftFS command reuses the init container in ws-daemon.

The command config cluster and config files have been designed so that future commands can be written. The config cluster is designed for commands that deploy a Kubernetes resource to get the answer and the config files is designed for commands that are run against the file system, either on the cluster or against a mounted volume in a pod.

This is part of a major refactoring of the configuration so that it's simpler and just config generation. See #12319 for my notepad of how it'll look eventually.

Related Issue(s)

Fixes #12198

How to test

Run the commands. This should be run on an instance that supports ShiftFS (ie, not Azure/k3s) and one that does not. The config files containerd command will need to be run on a cluster - you may test with the following script on your test cluster (this should run without error and set the containerdRuntimeDir and containerdSocket at the bottom:

apiVersion: batch/v1
kind: Job
metadata:
  name: installer
  labels:
    app: gitpod
    component: gitpod-installer
spec:
  backoffLimit: 1
  ttlSecondsAfterFinished: 60
  template:
    metadata:
      labels:
        app: gitpod
        component: gitpod-installer
    spec:
      restartPolicy: OnFailure
      containers:
        - name: installer
          image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-config-detect.4"
          volumeMounts:
            - mountPath: /mnt/node0
              name: node-fs0
              readOnly: true
          env:
            - name: CONFIG_FILE
              value: /tmp/gitpod-config.yaml
            - name: NAMESPACE
              value: gitpod
          command:
            - /bin/sh
            - -c
          args:
            - |
              /app/installer config init
              /app/installer config files containerd --mount-path=/mnt/node0
              cat ${CONFIG_FILE}
      volumes:
        - name: node-fs0
          hostPath:
            path: /
            type: Directory

Release Notes

[installer]: config detects shiftfs and containerd values

Documentation

Werft options:

  • /werft with-preview

@mrsimonemms mrsimonemms changed the title Sje/installer config detect [installer]: config detects shiftfs and containerd values Sep 6, 2022
@mrsimonemms mrsimonemms mentioned this pull request Sep 6, 2022
1 task
@mrsimonemms mrsimonemms force-pushed the sje/installer-config-detect branch 3 times, most recently from 5d85fa2 to 734639b Compare September 12, 2022 07:34
@mrsimonemms mrsimonemms force-pushed the sje/installer-config-detect branch from 734639b to 2207bee Compare September 12, 2022 10:57
@mrsimonemms mrsimonemms marked this pull request as ready for review September 12, 2022 11:00
@mrsimonemms mrsimonemms requested a review from a team September 12, 2022 11:00
@mrsimonemms mrsimonemms requested a review from a team September 12, 2022 11:00
@github-actions github-actions bot added team: delivery Issue belongs to the self-hosted team team: workspace Issue belongs to the Workspace team labels Sep 12, 2022
@nandajavarma
Copy link
Contributor

nandajavarma commented Sep 12, 2022

/werft run with-sh-preview

👍 started the job as gitpod-build-sje-installer-config-detect.5
(with .werft/ from main)

@nandajavarma
Copy link
Contributor

nandajavarma commented Sep 12, 2022

/werft run with-sh-preview cluster=gke

👍 started the job as gitpod-build-sje-installer-config-detect.6
(with .werft/ from main)

Copy link
Contributor

@nandajavarma nandajavarma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Can't wait to see it used in KOTS installer config!
Ran self-hosted tests on k3s and GKE to make sure normal installation isn't affected.

@mrsimonemms
Copy link
Contributor Author

Thanks @nandajavarma, much appreciated

@roboquat roboquat merged commit 26268ee into main Sep 12, 2022
@roboquat roboquat deleted the sje/installer-config-detect branch September 12, 2022 19:17
@roboquat roboquat added the deployed: workspace Workspace team change is running in production label Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production release-note size/XXL team: delivery Issue belongs to the self-hosted team team: workspace Issue belongs to the Workspace team
Projects
None yet
4 participants