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

add support for modifying securityContext for code executor #152

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

avimoondra
Copy link
Contributor

@avimoondra avimoondra commented Feb 16, 2024

helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="3.20.16" --set codeExecutor.securityContext.privileged=false | rg tryretool/code-executor-servic -C 10
echo "~~~~~~~~~~~~~~~"
helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="3.20.16" --set codeExecutor.securityContext.privileged=true | rg tryretool/code-executor-servic -C 10
echo "~~~~~~~~~~~~~~~"
helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="3.20.16" | rg tryretool/code-executor-servic -C 10
echo "~~~~~~~~~~~~~~~"
helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="3.20.16" --set codeExecutor.securityContext.privileged=false --set codeExecutor.securityContext.fsGroup=1000 | rg tryretool/code-executor-servic -C 10
echo "~~~~~~~~~~~~~~~"
      annotations:
        prometheus.io/job: foo-retool-code-executor
        prometheus.io/scrape: 'true'
        prometheus.io/port: '9090'
      labels:
        retoolService: foo-retool-code-executor
    spec:
      serviceAccountName: foo-retool
      containers:
      - name: retool
        image: "tryretool/code-executor-service:3.20.16"
        imagePullPolicy: IfNotPresent
        securityContext:

          privileged: false

        env:
          - name: DEPLOYMENT_TEMPLATE_TYPE
            value: "k8s-helm"
          - name: DEPLOYMENT_TEMPLATE_VERSION
            value: "6.0.17"
~~~~~~~~~~~~~~~
      annotations:
        prometheus.io/job: foo-retool-code-executor
        prometheus.io/scrape: 'true'
        prometheus.io/port: '9090'
      labels:
        retoolService: foo-retool-code-executor
    spec:
      serviceAccountName: foo-retool
      containers:
      - name: retool
        image: "tryretool/code-executor-service:3.20.16"
        imagePullPolicy: IfNotPresent
        securityContext:

          privileged: true

        env:
          - name: DEPLOYMENT_TEMPLATE_TYPE
            value: "k8s-helm"
          - name: DEPLOYMENT_TEMPLATE_VERSION
            value: "6.0.17"
~~~~~~~~~~~~~~~
      annotations:
        prometheus.io/job: foo-retool-code-executor
        prometheus.io/scrape: 'true'
        prometheus.io/port: '9090'
      labels:
        retoolService: foo-retool-code-executor
    spec:
      serviceAccountName: foo-retool
      containers:
      - name: retool
        image: "tryretool/code-executor-service:3.20.16"
        imagePullPolicy: IfNotPresent
        securityContext:

          privileged: true

        env:
          - name: DEPLOYMENT_TEMPLATE_TYPE
            value: "k8s-helm"
          - name: DEPLOYMENT_TEMPLATE_VERSION
            value: "6.0.17"
~~~~~~~~~~~~~~~
      annotations:
        prometheus.io/job: foo-retool-code-executor
        prometheus.io/scrape: 'true'
        prometheus.io/port: '9090'
      labels:
        retoolService: foo-retool-code-executor
    spec:
      serviceAccountName: foo-retool
      containers:
      - name: retool
        image: "tryretool/code-executor-service:3.20.16"
        imagePullPolicy: IfNotPresent
        securityContext:

          fsGroup: 1000
          privileged: false

        env:
          - name: DEPLOYMENT_TEMPLATE_TYPE
            value: "k8s-helm"
          - name: DEPLOYMENT_TEMPLATE_VERSION
~~~~~~~~~~~~~~~

@avimoondra avimoondra merged commit 7684ef7 into main Feb 22, 2024
12 checks passed
@avimoondra avimoondra deleted the avimoondra/updates-for-privileged-mode branch February 22, 2024 19:20
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.

2 participants