-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8122af0
commit c4ad77d
Showing
9 changed files
with
285 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0" | ||
description: A Helm chart for Kubernetes | ||
name: kubeops | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "kubeops.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 "kubeops.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 "kubeops.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "kubeops.fullname" . }}-clusterrole | ||
labels: | ||
app.kubernetes.io/name: {{ include "kubeops.name" . }} | ||
helm.sh/chart: {{ include "kubeops.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
rules: | ||
- apiGroups: ["*"] | ||
resources: ["*"] | ||
verbs: ["get", "watch", "list"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "kubeops.fullname" . }}-clusterrolebinding | ||
labels: | ||
app.kubernetes.io/name: {{ include "kubeops.name" . }} | ||
helm.sh/chart: {{ include "kubeops.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ include "kubeops.fullname" . }}-clusterrole | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "kubeops.fullname" . }}-sa | ||
namespace: {{ .Release.Namespace }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "kubeops.fullname" . }}-configmap | ||
labels: | ||
app.kubernetes.io/name: {{ include "kubeops.name" . }} | ||
helm.sh/chart: {{ include "kubeops.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
data: | ||
kubeopsconfig.yaml: | | ||
{{- with .Values.kubeopsconfig }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "kubeops.fullname" . }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "kubeops.name" . }} | ||
helm.sh/chart: {{ include "kubeops.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
component: controller | ||
app: kubeops | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
component: controller | ||
app: kubeops | ||
template: | ||
metadata: | ||
labels: | ||
component: controller | ||
app: kubeops | ||
annotations: | ||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} | ||
spec: | ||
serviceAccountName: {{ include "kubeops.fullname" . }}-sa | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
volumeMounts: | ||
- name: config-volume | ||
mountPath: "/config" | ||
env: | ||
- name: KUBEOPS_CONFIG_PATH | ||
value: "/config/" | ||
volumes: | ||
- name: config-volume | ||
configMap: | ||
name: {{ include "kubeops.fullname" . }}-configmap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "kubeops.fullname" . }}-sa | ||
labels: | ||
app.kubernetes.io/name: {{ include "kubeops.name" . }} | ||
helm.sh/chart: {{ include "kubeops.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
# Default values for kubeops. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
replicaCount: 1 | ||
|
||
image: | ||
repository: infracloud/kubeops | ||
tag: "0.1" | ||
pullPolicy: Always | ||
|
||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
kubeopsconfig: | ||
## Resources you want to watch | ||
resources: | ||
- name: pods | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: services | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: deployments | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: ingresses | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: nodes | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: namespaces | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: persistentvolumes | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: secrets | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: configmaps | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: daemonsets | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
- name: jobs | ||
namespaces: | ||
- all | ||
events: | ||
- delete | ||
|
||
# Events you want to watch | ||
events: | ||
types: | ||
- normal | ||
- warning | ||
|
||
# RBAC events you want to watch | ||
#rbac: | ||
# - name: roles | ||
# namespaces: | ||
# - all | ||
# events: | ||
# - create | ||
# - delete | ||
# - name: rolebindings | ||
# namespaces: | ||
# - all | ||
# events: | ||
# - create | ||
# - delete | ||
# - name: clusterroles | ||
# namespaces: | ||
# - all | ||
# events: | ||
# - create | ||
# - delete | ||
# - name: clusterrolebindings | ||
# namespace: | ||
# - all | ||
# events: | ||
# - create | ||
# - delete | ||
# | ||
# Recommendations you want to receive | ||
recommendations: true | ||
|
||
# Channels configuration | ||
communications: | ||
slack: | ||
channel: 'SLACK_CHANNEL' | ||
token: 'SLACK_API_TOKEN' | ||
|
||
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: {} |