Kaynağa Gözat

Merge pull request #233 from truenas/NAS-113153

NAS-113153 / 22.02-RC.2 / Allow specifying linux capabilities for containers in ix-chart
Waqar Ahmed 3 yıl önce
ebeveyn
işleme
0ca5ea9be6
40 değiştirilmiş dosya ile 60 ekleme ve 78 silme
  1. 0 37
      charts/ix-chart/2109.0.0/default_values.yaml
  2. 0 0
      charts/ix-chart/2109.0.0/values.yaml
  3. 0 0
      charts/ix-chart/2111.0.0/.helmignore
  4. 0 0
      charts/ix-chart/2111.0.0/Chart.lock
  5. 1 1
      charts/ix-chart/2111.0.0/Chart.yaml
  6. 0 0
      charts/ix-chart/2111.0.0/README.md
  7. 0 0
      charts/ix-chart/2111.0.0/app-readme.md
  8. 0 0
      charts/ix-chart/2111.0.0/charts/common-2105.0.0.tgz
  9. 11 0
      charts/ix-chart/2111.0.0/questions.yaml
  10. 0 0
      charts/ix-chart/2111.0.0/templates/NOTES.txt
  11. 0 0
      charts/ix-chart/2111.0.0/templates/_containers.tpl
  12. 0 0
      charts/ix-chart/2111.0.0/templates/_helpers.tpl
  13. 0 0
      charts/ix-chart/2111.0.0/templates/_networking.tpl
  14. 0 0
      charts/ix-chart/2111.0.0/templates/_volumes.tpl
  15. 5 1
      charts/ix-chart/2111.0.0/templates/_workload.tpl
  16. 0 0
      charts/ix-chart/2111.0.0/templates/external-interfaces.yaml
  17. 0 0
      charts/ix-chart/2111.0.0/templates/service.yaml
  18. 0 0
      charts/ix-chart/2111.0.0/templates/tests/deployment-check.yaml
  19. 0 0
      charts/ix-chart/2111.0.0/templates/workload.yaml
  20. 3 0
      charts/ix-chart/2111.0.0/test_values.yaml
  21. 0 37
      test/ix-chart/2109.1.0/default_values.yaml
  22. 0 0
      test/ix-chart/2109.1.0/values.yaml
  23. 0 0
      test/ix-chart/2111.0.0/.helmignore
  24. 0 0
      test/ix-chart/2111.0.0/Chart.lock
  25. 1 1
      test/ix-chart/2111.0.0/Chart.yaml
  26. 0 0
      test/ix-chart/2111.0.0/README.md
  27. 0 0
      test/ix-chart/2111.0.0/app-readme.md
  28. 0 0
      test/ix-chart/2111.0.0/charts/common-2105.0.0.tgz
  29. 31 0
      test/ix-chart/2111.0.0/questions.yaml
  30. 0 0
      test/ix-chart/2111.0.0/templates/NOTES.txt
  31. 0 0
      test/ix-chart/2111.0.0/templates/_containers.tpl
  32. 0 0
      test/ix-chart/2111.0.0/templates/_helpers.tpl
  33. 0 0
      test/ix-chart/2111.0.0/templates/_networking.tpl
  34. 0 0
      test/ix-chart/2111.0.0/templates/_volumes.tpl
  35. 5 1
      test/ix-chart/2111.0.0/templates/_workload.tpl
  36. 0 0
      test/ix-chart/2111.0.0/templates/external-interfaces.yaml
  37. 0 0
      test/ix-chart/2111.0.0/templates/service.yaml
  38. 0 0
      test/ix-chart/2111.0.0/templates/tests/deployment-check.yaml
  39. 0 0
      test/ix-chart/2111.0.0/templates/workload.yaml
  40. 3 0
      test/ix-chart/2111.0.0/test_values.yaml

+ 0 - 37
charts/ix-chart/2109.0.0/default_values.yaml

@@ -1,37 +0,0 @@
-# Default values for ix-chart.
-
-image:
-  repository: debian
-  pullPolicy: IfNotPresent
-  # Overrides the image tag whose default is the chart appVersion.
-  tag: "latest"
-
-# Restart / Update policy
-updateStrategy: RollingUpdate
-
-# Container CMD / entrypoint
-containerCommand: []
-containerArgs: []
-containerEnvironmentVariables: []
-
-# Network related configuration
-externalInterfaces: []
-portForwardingList: []
-hostNetwork: false
-dnsPolicy: Default
-dnsConfig:
-  nameservers: []
-  searches: []
-
-# Storage related configuration
-hostPathVolumes: []
-volumes: []
-
-# Probes
-# Liveness Probe
-livenessProbe: null
-
-# Workload type
-workloadType: "Deployment"
-
-gpuConfiguration: {}

+ 0 - 0
charts/ix-chart/2109.0.0/values.yaml


+ 0 - 0
charts/ix-chart/2109.0.0/.helmignore → charts/ix-chart/2111.0.0/.helmignore


+ 0 - 0
charts/ix-chart/2109.0.0/Chart.lock → charts/ix-chart/2111.0.0/Chart.lock


+ 1 - 1
charts/ix-chart/2109.0.0/Chart.yaml → charts/ix-chart/2111.0.0/Chart.yaml

@@ -15,7 +15,7 @@ type: application
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
 # Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 2109.0.0
+version: 2111.0.0
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application. Versions are not expected to

+ 0 - 0
charts/ix-chart/2109.0.0/README.md → charts/ix-chart/2111.0.0/README.md


+ 0 - 0
charts/ix-chart/2109.0.0/app-readme.md → charts/ix-chart/2111.0.0/app-readme.md


+ 0 - 0
charts/ix-chart/2109.0.0/charts/common-2105.0.0.tgz → charts/ix-chart/2111.0.0/charts/common-2105.0.0.tgz


+ 11 - 0
test/ix-chart/2109.1.0/questions.yaml → charts/ix-chart/2111.0.0/questions.yaml

@@ -514,3 +514,14 @@ questions:
           schema:
             type: boolean
             default: false
+        - variable: capabilities
+          label: "Capabilities"
+          description: "With Linux capabilities, you can grant certain privileges to a process without granting all the privileges of the root user."
+          schema:
+            type: list
+            items:
+              - variable: capability
+                description: "Add Capability"
+                label: "Add Capability"
+                schema:
+                  type: string

+ 0 - 0
charts/ix-chart/2109.0.0/templates/NOTES.txt → charts/ix-chart/2111.0.0/templates/NOTES.txt


+ 0 - 0
charts/ix-chart/2109.0.0/templates/_containers.tpl → charts/ix-chart/2111.0.0/templates/_containers.tpl


+ 0 - 0
charts/ix-chart/2109.0.0/templates/_helpers.tpl → charts/ix-chart/2111.0.0/templates/_helpers.tpl


+ 0 - 0
charts/ix-chart/2109.0.0/templates/_networking.tpl → charts/ix-chart/2111.0.0/templates/_networking.tpl


+ 0 - 0
charts/ix-chart/2109.0.0/templates/_volumes.tpl → charts/ix-chart/2111.0.0/templates/_volumes.tpl


+ 5 - 1
test/ix-chart/2109.1.0/templates/_workload.tpl → charts/ix-chart/2111.0.0/templates/_workload.tpl

@@ -56,7 +56,11 @@ containers:
 - name: {{ .Chart.Name }}
   {{- include "volumeMountsConfiguration" . | indent 2}}
   securityContext:
-    {{- toYaml .Values.securityContext | nindent 12 }}
+    privileged: {{ .Values.securityContext.privileged }}
+    {{ if .Values.securityContext.capabilities }}
+    capabilities:
+      add: {{ toYaml .Values.securityContext.capabilities | nindent 8 }}
+    {{ end }}
   image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
   imagePullPolicy: {{ .Values.image.pullPolicy }}
   {{- include "containerCommand" . | indent 2 }}

+ 0 - 0
charts/ix-chart/2109.0.0/templates/external-interfaces.yaml → charts/ix-chart/2111.0.0/templates/external-interfaces.yaml


+ 0 - 0
charts/ix-chart/2109.0.0/templates/service.yaml → charts/ix-chart/2111.0.0/templates/service.yaml


+ 0 - 0
charts/ix-chart/2109.0.0/templates/tests/deployment-check.yaml → charts/ix-chart/2111.0.0/templates/tests/deployment-check.yaml


+ 0 - 0
charts/ix-chart/2109.0.0/templates/workload.yaml → charts/ix-chart/2111.0.0/templates/workload.yaml


+ 3 - 0
charts/ix-chart/2109.0.0/test_values.yaml → charts/ix-chart/2111.0.0/test_values.yaml

@@ -37,3 +37,6 @@ livenessProbe: null
 workloadType: "Deployment"
 
 gpuConfiguration: {}
+securityContext:
+  privileged: false
+  capabilities: []

+ 0 - 37
test/ix-chart/2109.1.0/default_values.yaml

@@ -1,37 +0,0 @@
-# Default values for ix-chart.
-
-image:
-  repository: debian
-  pullPolicy: IfNotPresent
-  # Overrides the image tag whose default is the chart appVersion.
-  tag: "latest"
-
-# Restart / Update policy
-updateStrategy: RollingUpdate
-
-# Container CMD / entrypoint
-containerCommand: []
-containerArgs: []
-containerEnvironmentVariables: []
-
-# Network related configuration
-externalInterfaces: []
-portForwardingList: []
-hostNetwork: false
-dnsPolicy: Default
-dnsConfig:
-  nameservers: []
-  searches: []
-
-# Storage related configuration
-hostPathVolumes: []
-volumes: []
-
-# Probes
-# Liveness Probe
-livenessProbe: null
-
-# Workload type
-workloadType: "Deployment"
-
-gpuConfiguration: {}

+ 0 - 0
test/ix-chart/2109.1.0/values.yaml


+ 0 - 0
test/ix-chart/2109.1.0/.helmignore → test/ix-chart/2111.0.0/.helmignore


+ 0 - 0
test/ix-chart/2109.1.0/Chart.lock → test/ix-chart/2111.0.0/Chart.lock


+ 1 - 1
test/ix-chart/2109.1.0/Chart.yaml → test/ix-chart/2111.0.0/Chart.yaml

@@ -15,7 +15,7 @@ type: application
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
 # Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 2109.1.0
+version: 2111.0.0
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application. Versions are not expected to

+ 0 - 0
test/ix-chart/2109.1.0/README.md → test/ix-chart/2111.0.0/README.md


+ 0 - 0
test/ix-chart/2109.1.0/app-readme.md → test/ix-chart/2111.0.0/app-readme.md


+ 0 - 0
test/ix-chart/2109.1.0/charts/common-2105.0.0.tgz → test/ix-chart/2111.0.0/charts/common-2105.0.0.tgz


+ 31 - 0
charts/ix-chart/2109.0.0/questions.yaml → test/ix-chart/2111.0.0/questions.yaml

@@ -292,6 +292,26 @@ questions:
                 label: "Search Entry"
                 schema:
                   type: string
+        - variable: options
+          label: "DNS Options"
+          schema:
+            type: list
+            items:
+              - variable: optionsEntry
+                label: "Option Entry Configuration"
+                schema:
+                  type: dict
+                  attrs:
+                    - variable: name
+                      label: "Option Name"
+                      schema:
+                        type: string
+                        required: true
+                    - variable: value
+                      label: "Option Value"
+                      schema:
+                        type: string
+                        required: true
 
   - variable: hostNetwork
     label: "Provide access to node network namespace for the workload"
@@ -494,3 +514,14 @@ questions:
           schema:
             type: boolean
             default: false
+        - variable: capabilities
+          label: "Capabilities"
+          description: "With Linux capabilities, you can grant certain privileges to a process without granting all the privileges of the root user."
+          schema:
+            type: list
+            items:
+              - variable: capability
+                description: "Add Capability"
+                label: "Add Capability"
+                schema:
+                  type: string

+ 0 - 0
test/ix-chart/2109.1.0/templates/NOTES.txt → test/ix-chart/2111.0.0/templates/NOTES.txt


+ 0 - 0
test/ix-chart/2109.1.0/templates/_containers.tpl → test/ix-chart/2111.0.0/templates/_containers.tpl


+ 0 - 0
test/ix-chart/2109.1.0/templates/_helpers.tpl → test/ix-chart/2111.0.0/templates/_helpers.tpl


+ 0 - 0
test/ix-chart/2109.1.0/templates/_networking.tpl → test/ix-chart/2111.0.0/templates/_networking.tpl


+ 0 - 0
test/ix-chart/2109.1.0/templates/_volumes.tpl → test/ix-chart/2111.0.0/templates/_volumes.tpl


+ 5 - 1
charts/ix-chart/2109.0.0/templates/_workload.tpl → test/ix-chart/2111.0.0/templates/_workload.tpl

@@ -56,7 +56,11 @@ containers:
 - name: {{ .Chart.Name }}
   {{- include "volumeMountsConfiguration" . | indent 2}}
   securityContext:
-    {{- toYaml .Values.securityContext | nindent 12 }}
+    privileged: {{ .Values.securityContext.privileged }}
+    {{ if .Values.securityContext.capabilities }}
+    capabilities:
+      add: {{ toYaml .Values.securityContext.capabilities | nindent 8 }}
+    {{ end }}
   image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
   imagePullPolicy: {{ .Values.image.pullPolicy }}
   {{- include "containerCommand" . | indent 2 }}

+ 0 - 0
test/ix-chart/2109.1.0/templates/external-interfaces.yaml → test/ix-chart/2111.0.0/templates/external-interfaces.yaml


+ 0 - 0
test/ix-chart/2109.1.0/templates/service.yaml → test/ix-chart/2111.0.0/templates/service.yaml


+ 0 - 0
test/ix-chart/2109.1.0/templates/tests/deployment-check.yaml → test/ix-chart/2111.0.0/templates/tests/deployment-check.yaml


+ 0 - 0
test/ix-chart/2109.1.0/templates/workload.yaml → test/ix-chart/2111.0.0/templates/workload.yaml


+ 3 - 0
test/ix-chart/2109.1.0/test_values.yaml → test/ix-chart/2111.0.0/test_values.yaml

@@ -37,3 +37,6 @@ livenessProbe: null
 workloadType: "Deployment"
 
 gpuConfiguration: {}
+securityContext:
+  privileged: false
+  capabilities: []