tryretool / retool-helm

MIT License
45 stars 57 forks source link

add support for modifying securityContext for code executor #152

Closed avimoondra closed 6 months ago

avimoondra commented 6 months ago
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
~~~~~~~~~~~~~~~