From 1887c0afb632eff9887eae651dc14d82a9b9d658 Mon Sep 17 00:00:00 2001 From: gardlt Date: Mon, 11 Dec 2017 18:43:11 +0000 Subject: [PATCH] feat(chart): adding-tiller - created tiller chart Change-Id: Ia03d13bc05366d8a1f2e69073d732eee559826e0 --- charts/tiller/.helmignore | 21 +++++ charts/tiller/Chart.yaml | 26 +++++++ .../tiller/templates/deployment-tiller.yaml | 78 +++++++++++++++++++ charts/tiller/templates/rbac.yaml | 30 +++++++ charts/tiller/templates/tiller-service.yaml | 38 +++++++++ charts/tiller/values.yaml | 32 ++++++++ 6 files changed, 225 insertions(+) create mode 100644 charts/tiller/.helmignore create mode 100644 charts/tiller/Chart.yaml create mode 100644 charts/tiller/templates/deployment-tiller.yaml create mode 100644 charts/tiller/templates/rbac.yaml create mode 100644 charts/tiller/templates/tiller-service.yaml create mode 100644 charts/tiller/values.yaml diff --git a/charts/tiller/.helmignore b/charts/tiller/.helmignore new file mode 100644 index 00000000..f0c13194 --- /dev/null +++ b/charts/tiller/.helmignore @@ -0,0 +1,21 @@ +# 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 diff --git a/charts/tiller/Chart.yaml b/charts/tiller/Chart.yaml new file mode 100644 index 00000000..2355be5d --- /dev/null +++ b/charts/tiller/Chart.yaml @@ -0,0 +1,26 @@ +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: A Helm chart for Tiller +name: tiller +version: 0.1.0 +keywords: +- tiller +home: https://docs.helm.sh/ +sources: +- https://github.com/kubernetes/helm +maintainers: +- name: att-comdev +engine: gotpl diff --git a/charts/tiller/templates/deployment-tiller.yaml b/charts/tiller/templates/deployment-tiller.yaml new file mode 100644 index 00000000..bddda924 --- /dev/null +++ b/charts/tiller/templates/deployment-tiller.yaml @@ -0,0 +1,78 @@ +{{/* +Copyright 2017 AT&T Intellectual Property. All other rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.deployment_tiller }} +{{- $envAll := . }} +--- +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: helm + name: tiller + name: tiller-deploy +spec: + replicas: 1 + selector: + matchLabels: + app: helm + name: tiller + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + app: helm + name: tiller + spec: + containers: + - env: + - name: TILLER_NAMESPACE + value: {{ .Values.Name }} + - name: TILLER_HISTORY_MAX + value: {{ .Values.deployment.tiller_history | quote }} + image: {{ .Values.images.tags.tiller }} + livenessProbe: + failureThreshold: 3 + httpGet: + path: /liveness + port: 44135 + scheme: HTTP + initialDelaySeconds: 1 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + name: tiller + ports: + - containerPort: 44134 + name: tiller + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /readiness + port: 44135 + scheme: HTTP + initialDelaySeconds: 1 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: {} +status: {} +{{- end }} diff --git a/charts/tiller/templates/rbac.yaml b/charts/tiller/templates/rbac.yaml new file mode 100644 index 00000000..c504d68f --- /dev/null +++ b/charts/tiller/templates/rbac.yaml @@ -0,0 +1,30 @@ +{{/* +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.rbac }} +{{- $envAll := . }} +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: tiller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: tiller + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/tiller/templates/tiller-service.yaml b/charts/tiller/templates/tiller-service.yaml new file mode 100644 index 00000000..0f4fea04 --- /dev/null +++ b/charts/tiller/templates/tiller-service.yaml @@ -0,0 +1,38 @@ +{{/* +Copyright 2017 AT&T Intellectual Property. All other rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.service_tiller_deploy }} +{{- $envAll := . }} +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: helm + name: tiller + name: tiller-deploy +spec: + ports: + - name: tiller + port: 44134 + protocol: TCP + targetPort: tiller + selector: + app: helm + name: tiller + sessionAffinity: None + type: ClusterIP +{{- end }} diff --git a/charts/tiller/values.yaml b/charts/tiller/values.yaml new file mode 100644 index 00000000..6cb796ab --- /dev/null +++ b/charts/tiller/values.yaml @@ -0,0 +1,32 @@ +# Copyright 2017 AT&T Intellectual Property. All other rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# namespace: "kube-system" + +images: + tags: + tiller: gcr.io/kubernetes-helm/tiller:v2.7.0 + + pull_policy: "IfNotPresent" + +deployment: + replicas: 1 + # The amount of revision tiller is willing to support. 0 means that there is + # no limit. + tiller_history: 0 + +manifests: + deployment_tiller: true + service_tiller: true + rbac: true