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
Show 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
appVersion
:
"
0.
0.27
"
appVersion
:
"
0.
1.0
"
description
:
|
Run CIS benhmark tests
name
:
rancher-cis-benchmark
...
...
charts/rancher-cis-benchmark/v0.0.1/templates/configmap.yaml
View file @
3c967267
...
...
@@ -6,7 +6,7 @@ metadata:
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
name
:
s
onobuoy-config-cm
name
:
s
-config-cm-{{ .Release.Name }}
data
:
config.json
:
|
{
...
...
@@ -21,6 +21,9 @@ data:
"name": "rancher-kube-bench"
}
],
"PluginSearchPath": [
"/plugins.d"
],
"Resources": [],
"ResultsDir": "/tmp/sonobuoy",
"Server": {
...
...
@@ -29,7 +32,9 @@ data:
"bindport": 443,
"timeoutseconds": 5400
},
"Version": "v0.13.0"
"Namespace": "{{ .Release.Namespace }}",
"WorkerImage": "sonobuoy/sonobuoy:v0.16.3",
"Version": "v0.16.3"
}
---
apiVersion
:
v1
...
...
@@ -40,18 +45,34 @@ metadata:
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
name
:
s
onobuoy-plugins-cm
name
:
s
-plugins-cm-{{ .Release.Name }}
data
:
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:
driver: DaemonSet
plugin-name: rancher-kube-bench
result-type: rancher-kube-bench
result-format: raw
spec:
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"]
env:
- name: SONOBUOY_NS
value: {{ .Release.Namespace }}
- name: NODE_NAME
valueFrom:
fieldRef:
...
...
@@ -60,6 +81,12 @@ data:
value: /tmp/results
- name: CHROOT_DIR
value: /node
{{- if .Values.debug }}
- name: DEBUG
value: "true"
- name: DEBUG_TIME_IN_SEC
value: {{ .Values.debugTime }}
{{- end }}
imagePullPolicy: Always
securityContext:
privileged: true
...
...
charts/rancher-cis-benchmark/v0.0.1/templates/pod.yaml
View file @
3c967267
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
s
onobuoy
name
:
s
ecurity-scan-runner-{{ .Release.Name }}
{{
- if ne .Values.owner ""
}}
annotations
:
field.cattle.io/clusterScanOwner
:
"
{{
.Values.owner
}}"
...
...
@@ -11,26 +11,39 @@ metadata:
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
run
:
sonobuoy-master
spec
:
# TODO: make the sa name configurable
serviceAccountName
:
sonobuoy-serviceaccount
serviceAccountName
:
s-sa-{{ .Release.Name }}
volumes
:
-
configMap
:
name
:
s
onobuoy-config-cm
name
:
s
onobuoy
-config-volume
name
:
s
-config-cm-{{ .Release.Name }}
name
:
s-config-volume
-
configMap
:
name
:
s
onobuoy-plugins-cm
name
:
s
onobuoy
-plugins-volume
name
:
s
-plugins-cm-{{ .Release.Name }}
name
:
s-plugins-volume
-
emptyDir
:
{}
name
:
output-volume
{{
- if ne .Values.skipConfigMapName ""
}}
-
configMap
:
name
:
{{
.Values.skipConfigMapName
}}
name
:
s-skip-info-volume
{{
- end
}}
containers
:
-
name
:
{{
.Chart.Name
}}
restartPolicy
:
Never
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
value
:
{{
include "rancher-cis-benchmark.fullname" .
}}
{{
- if ne .Values.owner ""
}}
-
name
:
CONFIGMAPNAME
-
name
:
OUTPUT_
CONFIGMAPNAME
value
:
{{
.Release.Name
}}
{{
- end
}}
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.tag
}}"
...
...
@@ -40,11 +53,15 @@ spec:
protocol
:
TCP
volumeMounts
:
-
mountPath
:
/etc/sonobuoy
name
:
s
onobuoy
-config-volume
name
:
s-config-volume
-
mountPath
:
/plugins.d
name
:
s
onobuoy
-plugins-volume
name
:
s-plugins-volume
-
mountPath
:
/tmp/sonobuoy
name
:
output-volume
{{
- if ne .Values.skipConfigMapName ""
}}
-
mountPath
:
/etc/kbs
name
:
s-skip-info-volume
{{
- end
}}
resources
:
{{
- toYaml .Values.resources | nindent 12
}}
{{
- with .Values.nodeSelector
}}
...
...
charts/rancher-cis-benchmark/v0.0.1/templates/rbac.yaml
View file @
3c967267
...
...
@@ -8,7 +8,7 @@ metadata:
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
---
apiVersion
:
rbac.authorization.k8s.io/v1beta1
kind
:
ClusterRole
...
...
@@ -20,7 +20,7 @@ metadata:
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
rules
:
-
apiGroups
:
-
'
*'
...
...
@@ -39,16 +39,16 @@ metadata:
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
kind
:
ClusterRole
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
subjects
:
-
kind
:
ServiceAccount
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
s
onobuoy-serviceaccount
name
:
s
-sa-{{ .Release.Name }}
namespace
:
{{
.Release.Namespace
}}
charts/rancher-cis-benchmark/v0.0.1/values.yaml
View file @
3c967267
...
...
@@ -4,7 +4,17 @@
replicaCount
:
1
# if owner is specified, it's used for the name of the configmap for results
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
:
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