Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system-charts
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rancher商店
system-charts
Commits
3c967267
Commit
3c967267
authored
Nov 21, 2019
by
Murali Paluru
Committed by
Alena Prokharchyk
Nov 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cis changes for new report format and config
parent
120ad828
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
20 deletions
+74
-20
Chart.yaml
charts/rancher-cis-benchmark/v0.0.1/Chart.yaml
+1
-1
configmap.yaml
charts/rancher-cis-benchmark/v0.0.1/templates/configmap.yaml
+31
-4
pod.yaml
charts/rancher-cis-benchmark/v0.0.1/templates/pod.yaml
+27
-10
rbac.yaml
charts/rancher-cis-benchmark/v0.0.1/templates/rbac.yaml
+5
-5
values.yaml
charts/rancher-cis-benchmark/v0.0.1/values.yaml
+10
-0
No files found.
charts/rancher-cis-benchmark/v0.0.1/Chart.yaml
View file @
3c967267
apiVersion
:
v1
apiVersion
:
v1
appVersion
:
"
0.
0.27
"
appVersion
:
"
0.
1.0
"
description
:
|
description
:
|
Run CIS benhmark tests
Run CIS benhmark tests
name
:
rancher-cis-benchmark
name
:
rancher-cis-benchmark
...
...
charts/rancher-cis-benchmark/v0.0.1/templates/configmap.yaml
View file @
3c967267
...
@@ -6,7 +6,7 @@ metadata:
...
@@ -6,7 +6,7 @@ metadata:
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
name
:
s
onobuoy-config-cm
name
:
s
-config-cm-{{ .Release.Name }}
data
:
data
:
config.json
:
|
config.json
:
|
{
{
...
@@ -21,6 +21,9 @@ data:
...
@@ -21,6 +21,9 @@ data:
"name": "rancher-kube-bench"
"name": "rancher-kube-bench"
}
}
],
],
"PluginSearchPath": [
"/plugins.d"
],
"Resources": [],
"Resources": [],
"ResultsDir": "/tmp/sonobuoy",
"ResultsDir": "/tmp/sonobuoy",
"Server": {
"Server": {
...
@@ -29,7 +32,9 @@ data:
...
@@ -29,7 +32,9 @@ data:
"bindport": 443,
"bindport": 443,
"timeoutseconds": 5400
"timeoutseconds": 5400
},
},
"Version": "v0.13.0"
"Namespace": "{{ .Release.Namespace }}",
"WorkerImage": "sonobuoy/sonobuoy:v0.16.3",
"Version": "v0.16.3"
}
}
---
---
apiVersion
:
v1
apiVersion
:
v1
...
@@ -40,18 +45,34 @@ metadata:
...
@@ -40,18 +45,34 @@ metadata:
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
name
:
s
onobuoy-plugins-cm
name
:
s
-plugins-cm-{{ .Release.Name }}
data
:
data
:
rancher-kube-bench.yaml
:
|
rancher-kube-bench.yaml
:
|
podSpec:
containers: []
dnsPolicy: ClusterFirstWithHostNet
hostIPC: true
hostNetwork: true
hostPID: true
serviceAccountName: s-sa-{{ .Release.Name }}
tolerations:
- operator: Exists
volumes:
- hostPath:
path: /
name: root
sonobuoy-config:
sonobuoy-config:
driver: DaemonSet
driver: DaemonSet
plugin-name: rancher-kube-bench
plugin-name: rancher-kube-bench
result-type: rancher-kube-bench
result-type: rancher-kube-bench
result-format: raw
spec:
spec:
name: rancher-kube-bench
name: rancher-kube-bench
image:
"{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image:
{{ .Values.image.repository }}:{{ .Values.image.tag }}
command: ["/bin/bash", "-c", "run_sonobuoy_plugin.sh && sleep 3600"]
command: ["/bin/bash", "-c", "run_sonobuoy_plugin.sh && sleep 3600"]
env:
env:
- name: SONOBUOY_NS
value: {{ .Release.Namespace }}
- name: NODE_NAME
- name: NODE_NAME
valueFrom:
valueFrom:
fieldRef:
fieldRef:
...
@@ -60,6 +81,12 @@ data:
...
@@ -60,6 +81,12 @@ data:
value: /tmp/results
value: /tmp/results
- name: CHROOT_DIR
- name: CHROOT_DIR
value: /node
value: /node
{{- if .Values.debug }}
- name: DEBUG
value: "true"
- name: DEBUG_TIME_IN_SEC
value: {{ .Values.debugTime }}
{{- end }}
imagePullPolicy: Always
imagePullPolicy: Always
securityContext:
securityContext:
privileged: true
privileged: true
...
...
charts/rancher-cis-benchmark/v0.0.1/templates/pod.yaml
View file @
3c967267
apiVersion
:
v1
apiVersion
:
v1
kind
:
Pod
kind
:
Pod
metadata
:
metadata
:
name
:
s
onobuoy
name
:
s
ecurity-scan-runner-{{ .Release.Name }}
{{
- if ne .Values.owner ""
}}
{{
- if ne .Values.owner ""
}}
annotations
:
annotations
:
field.cattle.io/clusterScanOwner
:
"
{{
.Values.owner
}}"
field.cattle.io/clusterScanOwner
:
"
{{
.Values.owner
}}"
...
@@ -11,26 +11,39 @@ metadata:
...
@@ -11,26 +11,39 @@ metadata:
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
run
:
sonobuoy-master
spec
:
spec
:
# TODO: make the sa name configurable
serviceAccountName
:
s-sa-{{ .Release.Name }}
serviceAccountName
:
sonobuoy-serviceaccount
volumes
:
volumes
:
-
configMap
:
-
configMap
:
name
:
s
onobuoy-config-cm
name
:
s
-config-cm-{{ .Release.Name }}
name
:
s
onobuoy
-config-volume
name
:
s-config-volume
-
configMap
:
-
configMap
:
name
:
s
onobuoy-plugins-cm
name
:
s
-plugins-cm-{{ .Release.Name }}
name
:
s
onobuoy
-plugins-volume
name
:
s-plugins-volume
-
emptyDir
:
{}
-
emptyDir
:
{}
name
:
output-volume
name
:
output-volume
{{
- if ne .Values.skipConfigMapName ""
}}
-
configMap
:
name
:
{{
.Values.skipConfigMapName
}}
name
:
s-skip-info-volume
{{
- end
}}
containers
:
containers
:
-
name
:
{{
.Chart.Name
}}
-
name
:
{{
.Chart.Name
}}
restartPolicy
:
Never
restartPolicy
:
Never
env
:
env
:
-
name
:
SKIP
value
:
{{
.Values.skip
}}
-
name
:
SONOBUOY_NS
value
:
{{
.Release.Namespace
}}
-
name
:
SONOBUOY_POD_NAME
valueFrom
:
fieldRef
:
fieldPath
:
metadata.name
-
name
:
SONOBUOY_ADVERTISE_IP
-
name
:
SONOBUOY_ADVERTISE_IP
value
:
{{
include "rancher-cis-benchmark.fullname" .
}}
value
:
{{
include "rancher-cis-benchmark.fullname" .
}}
{{
- if ne .Values.owner ""
}}
{{
- if ne .Values.owner ""
}}
-
name
:
CONFIGMAPNAME
-
name
:
OUTPUT_
CONFIGMAPNAME
value
:
{{
.Release.Name
}}
value
:
{{
.Release.Name
}}
{{
- end
}}
{{
- end
}}
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.tag
}}"
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.tag
}}"
...
@@ -40,11 +53,15 @@ spec:
...
@@ -40,11 +53,15 @@ spec:
protocol
:
TCP
protocol
:
TCP
volumeMounts
:
volumeMounts
:
-
mountPath
:
/etc/sonobuoy
-
mountPath
:
/etc/sonobuoy
name
:
s
onobuoy
-config-volume
name
:
s-config-volume
-
mountPath
:
/plugins.d
-
mountPath
:
/plugins.d
name
:
s
onobuoy
-plugins-volume
name
:
s-plugins-volume
-
mountPath
:
/tmp/sonobuoy
-
mountPath
:
/tmp/sonobuoy
name
:
output-volume
name
:
output-volume
{{
- if ne .Values.skipConfigMapName ""
}}
-
mountPath
:
/etc/kbs
name
:
s-skip-info-volume
{{
- end
}}
resources
:
resources
:
{{
- toYaml .Values.resources | nindent 12
}}
{{
- toYaml .Values.resources | nindent 12
}}
{{
- with .Values.nodeSelector
}}
{{
- with .Values.nodeSelector
}}
...
...
charts/rancher-cis-benchmark/v0.0.1/templates/rbac.yaml
View file @
3c967267
...
@@ -8,7 +8,7 @@ metadata:
...
@@ -8,7 +8,7 @@ metadata:
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
---
---
apiVersion
:
rbac.authorization.k8s.io/v1beta1
apiVersion
:
rbac.authorization.k8s.io/v1beta1
kind
:
ClusterRole
kind
:
ClusterRole
...
@@ -20,7 +20,7 @@ metadata:
...
@@ -20,7 +20,7 @@ metadata:
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
rules
:
rules
:
-
apiGroups
:
-
apiGroups
:
-
'
*'
-
'
*'
...
@@ -39,16 +39,16 @@ metadata:
...
@@ -39,16 +39,16 @@ metadata:
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
roleRef
:
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
apiGroup
:
rbac.authorization.k8s.io
kind
:
ClusterRole
kind
:
ClusterRole
# TODO: make the sa name configurable
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
subjects
:
subjects
:
-
kind
:
ServiceAccount
-
kind
:
ServiceAccount
# TODO: make the sa name configurable
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
namespace
:
{{
.Release.Namespace
}}
namespace
:
{{
.Release.Namespace
}}
charts/rancher-cis-benchmark/v0.0.1/values.yaml
View file @
3c967267
...
@@ -4,7 +4,17 @@
...
@@ -4,7 +4,17 @@
replicaCount
:
1
replicaCount
:
1
# if owner is specified, it's used for the name of the configmap for results
owner
:
"
"
owner
:
"
"
# skip is used specify which tests to skip
skip
:
"
"
# skipConfigMapName is used to specify the name of cm where the skip info is stored
# skip has higher precedence than what's specified in the configmap
skipConfigMapName
:
"
"
# when debug=true, the plugin pods sleep for the time specified
debug
:
false
debugTime
:
"
infinity"
image
:
image
:
repository
:
rancher/security-scan
repository
:
rancher/security-scan
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment