Skip to content

Commit

Permalink
Merge pull request #45 from Flaconi/OPS-4836
Browse files Browse the repository at this point in the history
OPS-4836 Fix vulnerability CVE-2022-0185
  • Loading branch information
Maohsiang @github authored Jan 27, 2022
2 parents 36dc5d1 + 844a22f commit efe80f2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions templates/instance-groups.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ metadata:
name: {{ worker.name }}
spec:
image: {{ cluster.image | default(kops_default_image) }}
additionalUserData:
- name: sysctl.sh
type: text/x-shellscript
content: |
#!/bin/sh
sysctl -w kernel.unprivileged_userns_clone=0
echo "kernel.unprivileged_userns_clone=0" >> \
/etc/sysctl.conf
machineType: {{ machine_type }}
maxSize: {{ max_size }}
minSize: {{ min_size }}
Expand Down Expand Up @@ -101,6 +109,14 @@ metadata:
name: master-{{ subnet.az }}
spec:
image: {{ cluster.image | default(kops_default_image) }}
additionalUserData:
- name: sysctl.sh
type: text/x-shellscript
content: |
#!/bin/sh
sysctl -w kernel.unprivileged_userns_clone=0
echo "kernel.unprivileged_userns_clone=0" >> \
/etc/sysctl.conf
machineType: {% if 'master' in cluster and 'instance_type' in cluster.master %}{{ cluster.master.instance_type }}{% else %}{{ kops_default_master_instance_type }}{% endif %}

maxSize: 1
Expand Down

0 comments on commit efe80f2

Please sign in to comment.