Browse Source

Adding default apparmor profile to shipyard components

Change-Id: Idfc103c85bc95c8cd0a48aa0c18a17a4b1d12d3f
changes/38/705138/44
NarlaSandeepNarlaSaibaba 1 year ago
parent
commit
5aa0cde5f0
4 changed files with 16 additions and 5 deletions
  1. +1
    -0
      charts/shipyard/templates/deployment-shipyard.yaml
  2. +1
    -0
      charts/shipyard/templates/statefulset-airflow-worker.yaml
  3. +9
    -0
      charts/shipyard/values.yaml
  4. +5
    -5
      tools/gate/playbooks/airskiff-deploy.yaml

+ 1
- 0
charts/shipyard/templates/deployment-shipyard.yaml View File

@ -44,6 +44,7 @@ spec:
shipyard-configmap-etc-hash: {{ tuple "configmap-shipyard-etc.yaml" . | include "helm-toolkit.utils.hash" }}
airflow-configmap-bin-hash: {{ tuple "configmap-airflow-bin.yaml" . | include "helm-toolkit.utils.hash" }}
airflow-configmap-etc-hash: {{ tuple "configmap-airflow-etc.yaml" . | include "helm-toolkit.utils.hash" }}
{{ dict "envAll" $envAll "podName" "shipyard-api" "containerNames" (list "shipyard-api" "airflow-web") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
spec:
{{ dict "envAll" $envAll "application" "shipyard" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
serviceAccountName: {{ $serviceAccountName }}


+ 1
- 0
charts/shipyard/templates/statefulset-airflow-worker.yaml View File

@ -86,6 +86,7 @@ spec:
{{ $labels | indent 8 }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
{{ dict "envAll" $envAll "podName" "airflow-worker" "containerNames" (list "airflow-worker" "airflow-scheduler" "airflow-logrotate") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
spec:
serviceAccountName: {{ $serviceAccountName }}
affinity:


+ 9
- 0
charts/shipyard/values.yaml View File

@ -717,6 +717,15 @@ conf:
#Shipyard is not using this
# End of Airflow config options
pod:
mandatory_access_control:
type: apparmor
shipyard-api:
shipyard-api: runtime/default
airflow-web: runtime/default
airflow-worker:
airflow-worker: runtime/default
airflow-scheduler: runtime/default
airflow-logrotate: runtime/default
security_context:
shipyard:
pod:


+ 5
- 5
tools/gate/playbooks/airskiff-deploy.yaml View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: ubuntu-bionic
- hosts: primary
tasks:
# Stop systemd-resolved service before starting docker.
- name: stop systemd-resolved service
@ -31,15 +31,15 @@
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
- name: Deploy Kubernetes with Minikube
- name: Setup AppArmor
shell: |
./tools/deployment/airskiff/developer/010-deploy-k8s.sh
./tools/deployment/airskiff/developer/009-setup-apparmor.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"
- name: Setup AppArmor
- name: Deploy Kubernetes with Minikube
shell: |
./tools/deployment/airskiff/developer/015-setup-apparmor.sh
./tools/deployment/airskiff/developer/010-deploy-k8s.sh
args:
chdir: "{{ zuul.projects['opendev.org/airship/treasuremap'].src_dir }}"


Loading…
Cancel
Save