Skip to content

Commit 7923d71

Browse files
committed
Merge remote-tracking branch 'origin/master' into outpostlite-remediation-security-changes
# Conflicts: # wiz-outpost-lite/templates/deployment.yaml
2 parents 74822bf + 1a2b5c9 commit 7923d71

File tree

10 files changed

+57
-178
lines changed

10 files changed

+57
-178
lines changed

.circleci/tests/golden/wiz-outpost-lite/remediation.golden.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ apiVersion: v1
44
kind: ServiceAccount
55
metadata:
66
name: sa-remediation-aws-rds-003
7+
namespace: release-helm-namespace
78
labels:
89
helm.sh/chart: "GOLDEN_STATIC_VALUE"
910
app.kubernetes.io/name: wiz-outpost-lite

wiz-admission-controller/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ type: application
55
# This is the chart version. This version number should be incremented each time you make changes
66
# to the chart and its templates, including the app version.
77
# Versions are expected to follow Semantic Versioning (https://semver.org/)
8-
version: 3.10.0-preview.3
8+
version: 3.9.5
99
# This is the version number of the application being deployed. This version number should be
1010
# incremented each time you make changes to the application. Versions are not expected to
1111
# follow Semantic Versioning. They should reflect the version the application is using.
1212
# It is recommended to use it with quotes.
13-
appVersion: "2.9"
13+
appVersion: "2.8"
1414
dependencies:
1515
- name: wiz-common
1616
version: "0.1.8"

wiz-admission-controller/templates/_helpers.tpl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ If release name contains chart name it will be used as a full name.
5050
{{- end }}
5151
{{- end }}
5252

53-
{{- define "wiz-admission-controller-uninstall.name" -}}
54-
{{- if .Values.wizUninstallJob.nameOverride }}
55-
{{- .Values.wizUninstallJob.nameOverride | trunc 63 | trimSuffix "-" }}
56-
{{- else }}
57-
{{- $suffix := "-uninstall" -}}
58-
{{- $maxLength := int (sub 63 (len $suffix)) -}}
59-
{{- printf "%s%s" (include "wiz-admission-controller.fullname" . | trunc $maxLength | trimSuffix "-") $suffix -}}
60-
{{- end }}
61-
{{- end }}
62-
6353
{{- define "wiz-admission-controller.wiz-hpa-enforcer.name" -}}
6454
{{- $suffix := "-hpa" -}}
6555
{{- $maxLength := int (sub 63 (len $suffix)) -}}
@@ -130,14 +120,6 @@ Wiz manager selector labels
130120
app.kubernetes.io/name: {{ include "wiz-admission-controller-manager.name" . }}
131121
{{- end }}
132122

133-
{{/*
134-
Wiz uninstall selector labels
135-
*/}}
136-
{{- define "wiz-admission-controller-uninstall.selectorLabels" -}}
137-
app.kubernetes.io/name: {{ include "wiz-admission-controller-uninstall.name" . }}
138-
{{- end }}
139-
140-
141123
{{- define "wiz-admission-controller-enforcement.labels" -}}
142124
{{ include "wiz-admission-controller.labels" . }}
143125
{{ include "wiz-admission-controller-enforcement.selectorLabels" . }}
@@ -153,11 +135,6 @@ app.kubernetes.io/name: {{ include "wiz-admission-controller-uninstall.name" . }
153135
{{ include "wiz-admission-controller-manager.selectorLabels" . }}
154136
{{- end }}
155137

156-
{{- define "wiz-admission-controller-uninstall.labels" -}}
157-
{{ include "wiz-admission-controller.labels" . }}
158-
{{ include "wiz-admission-controller-uninstall.selectorLabels" . }}
159-
{{- end }}
160-
161138
{{/*
162139
Wiz Horizontal Pod Autoscaler labels
163140
*/}}

wiz-admission-controller/templates/jobuninstall.yaml

Lines changed: 0 additions & 123 deletions
This file was deleted.

wiz-admission-controller/values.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -498,21 +498,6 @@ wizManager:
498498
# If empty, a name is generated using the nameOverride
499499
name: ""
500500

501-
wizUninstallJob:
502-
enabled: true # Should the uninstall job be deployed.
503-
nameOverride: "" # Override the uninstall job name.
504-
timeoutSeconds: 300 # The timeout for the uninstall job in seconds.
505-
# Toggle the TTL (Time to Live) mechanism for automatic cleanup of finished Jobs.
506-
# Set to `true` to enable Kubernetes to automatically delete Jobs after they complete or fail, based on the `ttlSecondsAfterFinished` field.
507-
# Set to `false` if using Argo CD to manage Job lifecycle with deletion hooks, as TTL-based cleanup can cause Application to appear OutOfSync.
508-
# See: https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks/#sync-status-with-jobsworkflows-with-time-to-live-ttl
509-
useJobTTL: true
510-
jobAnnotations: {}
511-
podAnnotations: {}
512-
podAdditionalSpec: {}
513-
514-
515-
516501
# Global values to override chart values.
517502
global:
518503
nameOverride: "" # Override the release’s name.

wiz-kubernetes-integration/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: wiz-kubernetes-integration
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.2.84
5+
version: 0.2.87
66
appVersion: ""
77

88
# Dependencies for wiz-kubernetes connector and wiz-admission-controller and wiz-sensor

wiz-outpost-lite/templates/deployment.yaml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ spec:
2828
{{- if .Values.serviceAccount.create }}
2929
serviceAccountName: sa-{{ .runner }}
3030
{{- end }}
31-
{{- if or (hasKey .Values "podSecurityContext") (hasKey .Values "podSecurityContextOverride") }}
32-
securityContext:
33-
{{- if hasKey .Values "podSecurityContextOverride"}}
34-
{{- toYaml .Values.podSecurityContextOverride | nindent 8 }}
35-
{{- else }}
36-
{{- toYaml .Values.podSecurityContext | nindent 8 }}
37-
{{- end }}
38-
{{- end }}
3931
restartPolicy: Always
4032
{{- if .Values.affinity }}
4133
affinity:
@@ -150,14 +142,15 @@ spec:
150142
{{- end }}
151143
resources:
152144
{{- toYaml .Values.resources | nindent 12 }}
153-
{{- if or (hasKey .Values "containerSecurityContext") (hasKey .Values "containerSecurityContextOverride") }}
154145
securityContext:
155-
{{- if hasKey .Values "containerSecurityContextOverride"}}
156-
{{- toYaml .Values.containerSecurityContextOverride | nindent 12 }}
157-
{{- else }}
158-
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
146+
{{- if .Values.openshift }}
147+
privileged: true
159148
{{- end }}
160-
{{- end}}
149+
capabilities:
150+
add:
151+
- SYS_ADMIN
152+
seLinuxOptions:
153+
type: spc_t
161154
volumeMounts:
162155
- mountPath: /var/wiz
163156
name: working-dir
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{{- range $values := (include "wiz-outpost-lite.runners" . | fromJson) }}
2+
{{- with merge $values (omit $ "Values") }}
3+
{{- if and .Values.openshift (eq .runner "container-registry") -}}
4+
apiVersion: security.openshift.io/v1
5+
kind: SecurityContextConstraints
6+
metadata:
7+
name: {{ include "wiz-outpost-lite.fullname" . }}-scc
8+
labels: {{- include "wiz-outpost-lite.labels" . | nindent 4 }}
9+
allowHostDirVolumePlugin: true
10+
allowPrivilegedContainer: true
11+
readOnlyRootFilesystem: false
12+
allowHostIPC: false
13+
allowHostNetwork: false
14+
allowHostPID: false
15+
allowHostPorts: false
16+
requiredDropCapabilities: null
17+
groups: []
18+
priority: 0
19+
allowedCapabilities:
20+
- SYS_ADMIN
21+
fsGroup:
22+
type: RunAsAny
23+
runAsUser:
24+
type: RunAsAny
25+
seLinuxContext:
26+
type: RunAsAny
27+
supplementalGroups:
28+
type: RunAsAny
29+
seccompProfiles:
30+
- '*'
31+
users:
32+
- system:serviceaccount:{{ .Release.Namespace }}:sa-{{ .runner }}
33+
volumes:
34+
- downwardAPI
35+
- emptyDir
36+
- hostPath
37+
- secret
38+
---
39+
{{- end }}
40+
{{- end }}
41+
{{- end }}

wiz-outpost-lite/templates/serviceaccount.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ apiVersion: v1
55
kind: ServiceAccount
66
metadata:
77
name: sa-{{ .runner }}
8+
namespace: {{ .Release.Namespace }}
89
labels:
910
{{- include "wiz-outpost-lite.labels" . | nindent 4 }}
1011
---

wiz-outpost-lite/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ httpProxyConfiguration:
7171

7272
terminationGracePeriodSeconds: 30
7373

74+
# Use when installing on OpenShift clusters to create a SecurityContextConstraint for our service-account
75+
openshift: false
76+
77+
# Use when installing on OpenShift clusters to create a Service Account for the SecurityContextConstraint
7478
serviceAccount:
7579
create: false
7680

0 commit comments

Comments
 (0)