-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added helm chart - thanks Saneep Lamda
- Loading branch information
Sergio Rua
committed
Jul 29, 2019
1 parent
2d5e376
commit 7ddfdf6
Showing
9 changed files
with
227 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,19 @@ | ||
name: kube-tagger | ||
description: Helm Chart to inject TAGS to EBS | ||
version: 3.0.0 | ||
apiVersion: v1 | ||
kubeVersion: ">=1.11.8-eks-7c34c0" | ||
tillerVersion: ">=2.11.1" | ||
keywords: | ||
- kube-tagger | ||
engine: gotpl | ||
appVersion: 3.0.0 | ||
home: https://github.com/sergiorua/kube-tagger | ||
deprecated: false | ||
maintainers: | ||
- email: [email protected] | ||
name: slamba | ||
- email: [email protected] | ||
name: srua | ||
sources: | ||
- https://github.com/sergiorua/kube-tagger |
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,19 @@ | ||
# kube-tagger Helm Chart | ||
|
||
This Helm Chart will create the kube-tagger Pod to create EBS tags on PVC | ||
|
||
## Installation Commands | ||
|
||
You can install the chart directly | ||
|
||
``` | ||
helm upgrade --install kube-tagger ./kube-tagger/ --namespace=kube-system --debug --dry-run | ||
helm upgrade --install kube-tagger ./kube-tagger/ --namespace=kube-system --debug | ||
``` | ||
|
||
If Helm-Chart is in a repo | ||
|
||
``` | ||
helm upgrade --install kube-tagger chartmuseum/kube-tagger/ --namespace=kube-system --debug --dry-run | ||
helm upgrade --install kube-tagger chartmuseum/kube-tagger/ --namespace=kube-system --debug | ||
``` |
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,20 @@ | ||
The kube-tagger has been deployed. | ||
{{ if .Values.global.name }} | ||
You can see the pod is running or not with below command | ||
command: | ||
kubectl get pod kube-tagger -n kube-system | ||
|
||
NOTE: Please add the annotation as below to tag your PVC | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
annotations: | ||
volume.beta.kubernetes.io/additional-resource-tags: Owner=Sandeep;Environment=Dev | ||
{{ else }} | ||
NOTE: Please add the annotation as below to tag your PVC | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
annotations: | ||
volume.beta.kubernetes.io/additional-resource-tags: Owner=Sergio;Environment=Dev | ||
{{- 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,51 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "kube-tagger.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 "kube-tagger.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 "kube-tagger.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a service name that defaults to app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "kube-tagger.service.fullname" -}} | ||
{{- .Values.service.nameOverride | default .Chart.Name }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "kube-tagger.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} | ||
{{ default (include "kube-tagger.fullname" .) .Values.serviceAccount.name }} | ||
{{- else -}} | ||
{{ default "default" .Values.serviceAccount.name }} | ||
{{- end -}} | ||
{{- 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,20 @@ | ||
{{- if .Values.rbac.create -}} | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ .Values.global.name }} | ||
namespace: {{ .Values.global.namespace }} | ||
labels: | ||
app: {{ template "kube-tagger.name" . }} | ||
chart: {{ template "kube-tagger.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ .Values.global.name }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.global.name }} | ||
namespace: {{ .Values.global.namespace }} | ||
{{- 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,22 @@ | ||
{{- if .Values.rbac.create -}} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ .Values.global.name }} | ||
namespace: {{ .Values.global.namespace }} | ||
labels: | ||
app: {{ template "kube-tagger.name" . }} | ||
chart: {{ template "kube-tagger.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- persistentvolumeclaims | ||
- persistentvolumes | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
{{- 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,36 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.global.name }} | ||
namespace: {{ .Values.global.namespace }} | ||
labels: | ||
app: {{ template "kube-tagger.name" . }} | ||
chart: {{ template "kube-tagger.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ template "kube-tagger.name" . }} | ||
chart: {{ template "kube-tagger.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "kube-tagger.name" . }} | ||
chart: {{ template "kube-tagger.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
serviceAccountName: {{ .Values.global.name }} | ||
containers: | ||
- name: {{ .Values.global.name }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
command: ["/app/main"] | ||
{{- if .Values.extraEnv }} | ||
env: | ||
{{ toYaml .Values.extraEnv | indent 6 -}} | ||
{{- 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 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.global.name }} | ||
namespace: {{ .Values.global.namespace }} | ||
labels: | ||
app: {{ template "kube-tagger.name" . }} | ||
chart: {{ template "kube-tagger.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
automountServiceAccountToken: true | ||
{{- 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,27 @@ | ||
replicas: 1 | ||
|
||
global: | ||
name: kube-tagger | ||
namespace: kube-system | ||
|
||
rbac: | ||
create: true | ||
pspEnabled: false | ||
|
||
serviceAccount: | ||
create: true | ||
|
||
image: | ||
repository: sergrua/kube-tagger | ||
tag: release-0.0.5 | ||
pullPolicy: Always | ||
namespace: kube-system | ||
backoffLimit: 3 | ||
containerPort: 8080 | ||
|
||
extraEnv: {} | ||
resources: {} | ||
nodeSelector: {} | ||
tolerations: [] | ||
affinity: {} | ||
podAnnotations: {} |