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
ff3d5692
Commit
ff3d5692
authored
Jun 25, 2019
by
Murali Paluru
Committed by
Alena Prokharchyk
Jun 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIS chart (#45)
* important stuff: update README * cis chart - initial version * updating to use same image * adding owner * fixing the image name, version
parent
b2fb6146
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
384 additions
and
2 deletions
+384
-2
README.md
README.md
+2
-2
.helmignore
charts/rancher-cis-benchmark/v0.0.1/.helmignore
+22
-0
Chart.yaml
charts/rancher-cis-benchmark/v0.0.1/Chart.yaml
+12
-0
NOTES.txt
charts/rancher-cis-benchmark/v0.0.1/templates/NOTES.txt
+21
-0
_helpers.tpl
charts/rancher-cis-benchmark/v0.0.1/templates/_helpers.tpl
+32
-0
configmap.yaml
charts/rancher-cis-benchmark/v0.0.1/templates/configmap.yaml
+72
-0
ingress.yaml
charts/rancher-cis-benchmark/v0.0.1/templates/ingress.yaml
+39
-0
pod.yaml
charts/rancher-cis-benchmark/v0.0.1/templates/pod.yaml
+61
-0
rbac.yaml
charts/rancher-cis-benchmark/v0.0.1/templates/rbac.yaml
+54
-0
service.yaml
charts/rancher-cis-benchmark/v0.0.1/templates/service.yaml
+18
-0
values.yaml
charts/rancher-cis-benchmark/v0.0.1/values.yaml
+51
-0
No files found.
README.md
View file @
ff3d5692
system-charts
system-charts
============
============
Rancher 2.
0
system library charts.
Rancher 2.
x
system library charts.
## License
## License
Copyright (c) 201
8
[
Rancher Labs, Inc.
](
http://rancher.com
)
Copyright (c) 201
9
[
Rancher Labs, Inc.
](
http://rancher.com
)
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
...
...
charts/rancher-cis-benchmark/v0.0.1/.helmignore
0 → 100644
View file @
ff3d5692
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
charts/rancher-cis-benchmark/v0.0.1/Chart.yaml
0 → 100644
View file @
ff3d5692
apiVersion
:
v1
appVersion
:
"
0.0.27"
description
:
|
Run CIS benhmark tests
name
:
rancher-cis-benchmark
version
:
0.1.0
home
:
https://github.com/rancher/system-charts/charts/rancher-cis-benchmark
sources
:
-
"
https://github.com/rancher/system-charts/charts/rancher-cis-benchmark"
maintainers
:
-
name
:
Murali Paluru
email
:
leodotcloud@gmail.com
charts/rancher-cis-benchmark/v0.0.1/templates/NOTES.txt
0 → 100644
View file @
ff3d5692
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "rancher-cis-benchmark.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "rancher-cis-benchmark.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "rancher-cis-benchmark.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "rancher-cis-benchmark.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
charts/rancher-cis-benchmark/v0.0.1/templates/_helpers.tpl
0 → 100644
View file @
ff3d5692
{{
/*
vim
:
set
filetype
=
mustache
:
*/
}}
{
{
/*
Expand
the
name
of
the
chart
.
*/
}
}
{{- define "rancher-cis-benchmark.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{
{
/*
Create
a
default
fully
qualified
app
name
.
We
truncate
at
63
chars
because
some
Kubernetes
name
fields
are
limited
to
this
(
by
the
DNS
naming
spec
).
If
release
name
contains
chart
name
it
will
be
used
as
a
full
name
.
*/
}
}
{{- define "rancher-cis-benchmark.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{
{
/*
Create
chart
name
and
version
as
used
by
the
chart
label
.
*/
}
}
{{- define "rancher-cis-benchmark.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
charts/rancher-cis-benchmark/v0.0.1/templates/configmap.yaml
0 → 100644
View file @
ff3d5692
apiVersion
:
v1
kind
:
ConfigMap
metadata
:
labels
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
name
:
sonobuoy-config-cm
data
:
config.json
:
|
{
"Description": "kube-bench plugin for CIS benchmarks",
"Filters": {
"LabelSelector": "",
"Namespaces": "[^\\w-.]+"
},
"PluginNamespace": "{{ .Release.Namespace }}",
"Plugins": [
{
"name": "rancher-kube-bench"
}
],
"Resources": [],
"ResultsDir": "/tmp/sonobuoy",
"Server": {
"advertiseaddress": "{{ include "rancher-cis-benchmark.fullname" . }}",
"bindaddress": "0.0.0.0",
"bindport": 443,
"timeoutseconds": 5400
},
"Version": "v0.13.0"
}
---
apiVersion
:
v1
kind
:
ConfigMap
metadata
:
labels
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
name
:
sonobuoy-plugins-cm
data
:
rancher-kube-bench.yaml
:
|
sonobuoy-config:
driver: DaemonSet
plugin-name: rancher-kube-bench
result-type: rancher-kube-bench
spec:
name: rancher-kube-bench
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command: ["/bin/bash", "-c", "run_sonobuoy_plugin.sh && sleep 3600"]
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: RESULTS_DIR
value: /tmp/results
- name: CHROOT_DIR
value: /node
imagePullPolicy: Always
securityContext:
privileged: true
volumeMounts:
- mountPath: /tmp/results
name: results
readOnly: false
- mountPath: /node
name: root
readOnly: false
charts/rancher-cis-benchmark/v0.0.1/templates/ingress.yaml
0 → 100644
View file @
ff3d5692
{{
- if .Values.ingress.enabled -
}}
{{
- $fullName
:
= include "rancher-cis-benchmark.fullname" . -
}}
apiVersion
:
extensions/v1beta1
kind
:
Ingress
metadata
:
name
:
{{
$fullName
}}
labels
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
{{
- with .Values.ingress.annotations
}}
annotations
:
{{
- toYaml . | nindent 4
}}
{{
- end
}}
spec
:
{{
- if .Values.ingress.tls
}}
tls
:
{{
- range .Values.ingress.tls
}}
-
hosts
:
{{
- range .hosts
}}
-
{{
. | quote
}}
{{
- end
}}
secretName
:
{{
.secretName
}}
{{
- end
}}
{{
- end
}}
rules
:
{{
- range .Values.ingress.hosts
}}
-
host
:
{{
.host | quote
}}
http
:
paths
:
{{
- range .paths
}}
-
path
:
{{
.
}}
backend
:
serviceName
:
{{
$fullName
}}
servicePort
:
http
{{
- end
}}
{{
- end
}}
{{
- end
}}
charts/rancher-cis-benchmark/v0.0.1/templates/pod.yaml
0 → 100644
View file @
ff3d5692
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
sonobuoy
{{
- if ne .Values.owner ""
}}
annotations
:
field.cattle.io/clusterScanOwner
:
"
{{
.Values.owner
}}"
{{
- end
}}
labels
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
spec
:
# TODO: make the sa name configurable
serviceAccountName
:
sonobuoy-serviceaccount
volumes
:
-
configMap
:
name
:
sonobuoy-config-cm
name
:
sonobuoy-config-volume
-
configMap
:
name
:
sonobuoy-plugins-cm
name
:
sonobuoy-plugins-volume
-
emptyDir
:
{}
name
:
output-volume
containers
:
-
name
:
{{
.Chart.Name
}}
restartPolicy
:
Never
env
:
-
name
:
SONOBUOY_ADVERTISE_IP
value
:
{{
include "rancher-cis-benchmark.fullname" .
}}
{{
- if ne .Values.owner ""
}}
-
name
:
CONFIGMAPNAME
value
:
{{
.Release.Name
}}
{{
- end
}}
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.tag
}}"
imagePullPolicy
:
{{
.Values.image.pullPolicy
}}
ports
:
-
containerPort
:
8080
protocol
:
TCP
volumeMounts
:
-
mountPath
:
/etc/sonobuoy
name
:
sonobuoy-config-volume
-
mountPath
:
/plugins.d
name
:
sonobuoy-plugins-volume
-
mountPath
:
/tmp/sonobuoy
name
:
output-volume
resources
:
{{
- toYaml .Values.resources | nindent 12
}}
{{
- with .Values.nodeSelector
}}
nodeSelector
:
{{
- toYaml . | nindent 8
}}
{{
- end
}}
{{
- with .Values.affinity
}}
affinity
:
{{
- toYaml . | nindent 8
}}
{{
- end
}}
{{
- with .Values.tolerations
}}
tolerations
:
{{
- toYaml . | nindent 8
}}
{{
- end
}}
charts/rancher-cis-benchmark/v0.0.1/templates/rbac.yaml
0 → 100644
View file @
ff3d5692
apiVersion
:
v1
kind
:
ServiceAccount
metadata
:
labels
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
sonobuoy-serviceaccount
---
apiVersion
:
rbac.authorization.k8s.io/v1beta1
kind
:
ClusterRole
metadata
:
labels
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
sonobuoy-serviceaccount
rules
:
-
apiGroups
:
-
'
*'
resources
:
-
'
*'
verbs
:
-
'
*'
---
apiVersion
:
rbac.authorization.k8s.io/v1beta1
kind
:
ClusterRoleBinding
metadata
:
labels
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
sonobuoy-serviceaccount
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
kind
:
ClusterRole
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
sonobuoy-serviceaccount
subjects
:
-
kind
:
ServiceAccount
# TODO: make the sa name configurable
# name: {{ include "rancher-cis-benchmark.fullname" . }}-serviceaccount
name
:
sonobuoy-serviceaccount
namespace
:
{{
.Release.Namespace
}}
charts/rancher-cis-benchmark/v0.0.1/templates/service.yaml
0 → 100644
View file @
ff3d5692
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
{{
include "rancher-cis-benchmark.fullname" .
}}
labels
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
helm.sh/chart
:
{{
include "rancher-cis-benchmark.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
spec
:
type
:
{{
.Values.service.type
}}
ports
:
-
port
:
{{
.Values.service.port
}}
targetPort
:
443
protocol
:
TCP
selector
:
app.kubernetes.io/name
:
{{
include "rancher-cis-benchmark.name" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
charts/rancher-cis-benchmark/v0.0.1/values.yaml
0 → 100644
View file @
ff3d5692
# Default values for rancher-cis-benchmark.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount
:
1
owner
:
"
"
image
:
repository
:
rancher/security-scan
tag
:
v0.1.0
pullPolicy
:
Always
nameOverride
:
"
"
fullnameOverride
:
"
"
service
:
type
:
ClusterIP
port
:
443
ingress
:
enabled
:
false
annotations
:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts
:
-
host
:
chart-example.local
paths
:
[]
tls
:
[]
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources
:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector
:
{}
tolerations
:
[]
affinity
:
{}
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