Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Restore refactor of Helm template file writing logic (see #385)
Browse files Browse the repository at this point in the history
This reverts commit 4cc5ccb.
  • Loading branch information
ebramanti committed Aug 20, 2018
1 parent e5b723e commit 1b4f05c
Show file tree
Hide file tree
Showing 34 changed files with 472 additions and 109 deletions.
17 changes: 5 additions & 12 deletions integration/base/helm-fetch/expected/.ship/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@
---
assets:
v1:
- inline:
contents: |
this exists to create the charts directory
it should be removed when that bug is resolved
see https://github.com/replicatedhq/ship/issues/373
dest: ./charts/mkdir.sh
mode: 0777
- helm:
dest: charts/rendered
helm_fetch:
chart_ref: stable/mysql
version: "0.8.3"
- helm:
dest: charts/rendered
helm_fetch:
chart_ref: stable/mysql
version: "0.8.3"
config: {}
lifecycle:
v1:
Expand Down

This file was deleted.

17 changes: 5 additions & 12 deletions integration/base/helm-fetch/input/.ship/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@
---
assets:
v1:
- inline:
contents: |
this exists to create the charts directory
it should be removed when that bug is resolved
see https://github.com/replicatedhq/ship/issues/373
dest: ./charts/mkdir.sh
mode: 0777
- helm:
dest: charts/rendered
helm_fetch:
chart_ref: stable/mysql
version: "0.8.3"
- helm:
dest: charts/rendered
helm_fetch:
chart_ref: stable/mysql
version: "0.8.3"
config: {}
lifecycle:
v1:
Expand Down
2 changes: 1 addition & 1 deletion integration/base/helm-fetch/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
disable_online: true

skip_cleanup: true
skip_cleanup: false
12 changes: 12 additions & 0 deletions integration/base/helm-with-sub-charts/expected/.ship/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
assets:
v1:
- helm:
dest: charts/rendered
helm_fetch:
chart_ref: stable/datadog
version: "1.0.1"
config: {}
lifecycle:
v1:
- render: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"v1":{"config":{}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
##---
# Source: datadog/templates/apikey-secret.yaml


apiVersion: v1
kind: Secret
metadata:
name: ship-datadog
labels:
app: "ship-datadog"
chart: "datadog-1.0.1"
release: "ship"
heritage: "Tiller"
type: Opaque
data:
api-key: "TUlTU0lORw=="
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
##---
# Source: datadog/charts/kube-state-metrics/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
app: kube-state-metrics
chart: kube-state-metrics-0.8.0
heritage: Tiller
release: ship
name: ship-kube-state-metrics
rules:

- apiGroups: ["batch"]
resources:
- cronjobs
verbs: ["list", "watch"]

- apiGroups: ["extensions"]
resources:
- daemonsets
verbs: ["list", "watch"]

- apiGroups: ["extensions"]
resources:
- deployments
verbs: ["list", "watch"]

- apiGroups: [""]
resources:
- endpoints
verbs: ["list", "watch"]

- apiGroups: ["autoscaling"]
resources:
- horizontalpodautoscalers
verbs: ["list", "watch"]

- apiGroups: ["batch"]
resources:
- jobs
verbs: ["list", "watch"]

- apiGroups: [""]
resources:
- limitranges
verbs: ["list", "watch"]

- apiGroups: [""]
resources:
- namespaces
verbs: ["list", "watch"]

- apiGroups: [""]
resources:
- nodes
verbs: ["list", "watch"]

- apiGroups: [""]
resources:
- persistentvolumeclaims
verbs: ["list", "watch"]


- apiGroups: [""]
resources:
- persistentvolumes
verbs: ["list", "watch"]


- apiGroups: [""]
resources:
- pods
verbs: ["list", "watch"]

- apiGroups: ["extensions"]
resources:
- replicasets
verbs: ["list", "watch"]

- apiGroups: [""]
resources:
- replicationcontrollers
verbs: ["list", "watch"]

- apiGroups: [""]
resources:
- resourcequotas
verbs: ["list", "watch"]

- apiGroups: [""]
resources:
- services
verbs: ["list", "watch"]

- apiGroups: ["apps"]
resources:
- statefulsets
verbs: ["list", "watch"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
##---
# Source: datadog/charts/kube-state-metrics/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
app: kube-state-metrics
chart: kube-state-metrics-0.8.0
heritage: Tiller
release: ship
name: ship-kube-state-metrics
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ship-kube-state-metrics
subjects:
- kind: ServiceAccount
name: ship-kube-state-metrics
namespace: default
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
##---
# Source: datadog/charts/kube-state-metrics/templates/deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ship-kube-state-metrics
labels:
app: kube-state-metrics
chart: "kube-state-metrics-0.8.0"
release: "ship"
heritage: "Tiller"
spec:
replicas: 1
template:
metadata:
labels:
app: kube-state-metrics
release: "ship"
spec:
serviceAccountName: ship-kube-state-metrics
containers:
- name: kube-state-metrics
args:

- --collectors=cronjobs


- --collectors=daemonsets


- --collectors=deployments


- --collectors=endpoints


- --collectors=horizontalpodautoscalers


- --collectors=jobs


- --collectors=limitranges


- --collectors=namespaces


- --collectors=nodes


- --collectors=persistentvolumeclaims


- --collectors=persistentvolumes


- --collectors=pods


- --collectors=replicasets


- --collectors=replicationcontrollers


- --collectors=resourcequotas


- --collectors=services


- --collectors=statefulsets


imagePullPolicy: IfNotPresent
image: "k8s.gcr.io/kube-state-metrics:v1.3.1"
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
null


Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
##---
# Source: datadog/charts/kube-state-metrics/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: ship-kube-state-metrics
labels:
app: kube-state-metrics
chart: "kube-state-metrics-0.8.0"
release: "ship"
heritage: "Tiller"
annotations:
prometheus.io/scrape: 'true'
spec:
type: "ClusterIP"
ports:
- name: "http"
protocol: TCP
port: 8080
targetPort: 8080
selector:
app: kube-state-metrics
release: ship
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
##---
# Source: datadog/charts/kube-state-metrics/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: kube-state-metrics
chart: kube-state-metrics-0.8.0
heritage: Tiller
release: ship
name: ship-kube-state-metrics
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
##---
# Source: datadog/templates/clusterrole.yaml
apiVersion: "rbac.authorization.k8s.io/v1"
kind: ClusterRole
metadata:
labels:
app: "ship-datadog"
chart: "datadog-1.0.1"
heritage: "Tiller"
release: "ship"
name: ship-datadog
rules:
- apiGroups:
- ""
resources:
- services
- events
- endpoints
- pods
- nodes
- componentstatuses
verbs:
- get
- list
- watch
- nonResourceURLs:
- "/version"
- "/healthz"
verbs:
- get
- apiGroups: # Kubelet connectivity
- ""
resources:
- nodes/metrics
- nodes/spec
- nodes/proxy
verbs:
- get
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
##---
# Source: datadog/templates/clusterrolebinding.yaml
apiVersion: "rbac.authorization.k8s.io/v1"
kind: ClusterRoleBinding
metadata:
labels:
app: "ship-datadog"
chart: "datadog-1.0.1"
release: "ship"
heritage: "Tiller"
name: ship-datadog
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ship-datadog
subjects:
- kind: ServiceAccount
name: ship-datadog
namespace: default
Loading

0 comments on commit 1b4f05c

Please sign in to comment.