forked from att-comdev/openstack-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* As of helm 2.0.0, it no longer seems necessary to copy a "globals.tpl" into each child chart, defines in child charts now seem to be reliably rendered in the parent. This was not working correctly in 2.0.0rc2 and so after a lot of testing, the globals define insertion has been removed from the Makefiles. Also, includes piped to b64encode are working now, meaning we no longer have to do Makefile magic to base64 encode successfully. That has been removed. Once .Files.Get works properly in a child chart context we can remove all Make help. * The openstack-base chart has been renamed to common to better reflect that it is common to everything in aic-helm, even non-openstack projects like ceph. All charts now include it as a requirement. * A first pass at a "cleaner" template directory approach has been applied to rabbitmq as a test chart. This allows files such as _start_rabbit to live in their raw form and organizes files by config vs script in 'etc' or 'bin' directories. If accepted, will apply to all other charts for consistency.
- Loading branch information
1 parent
d01ba45
commit 877e0cd
Showing
42 changed files
with
118 additions
and
121 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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
**/*.tgz | ||
.idea/ | ||
**/_partials.tpl | ||
**/_common.tpl | ||
**/_globals.tpl |
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
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
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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
dependencies: [] | ||
digest: sha256:81059fe6210ccee4e3349c0f34c12d180f995150128a913d63b65b7937c6b152 | ||
generated: 2016-11-25T16:24:27.602432249-08:00 | ||
dependencies: | ||
- name: common | ||
repository: http://localhost:8879/charts | ||
version: 0.1.0 | ||
digest: sha256:c6a7e430c900036912fe3fdc14213e9280c5da0b6607ce4dcf6dc95535d114fc | ||
generated: 2016-11-29T12:54:37.241999965-08:00 |
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
dependencies: [] | ||
dependencies: | ||
- name: common | ||
repository: http://localhost:8879/charts | ||
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
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
# note that these secrets are handled by the common chart, not the ceph | ||
# chart, as we likely want them "everywhere" | ||
--- | ||
apiVersion: storage.k8s.io/v1beta1 | ||
kind: StorageClass | ||
metadata: | ||
name: general | ||
provisioner: kubernetes.io/rbd | ||
parameters: | ||
monitors: ceph-mon.ceph:6789 | ||
monitors: ceph-mon.{{.Release.Namespace}}:6789 | ||
adminId: admin | ||
adminSecretName: ceph-conf-combined-storageclass | ||
adminSecretNamespace: ceph | ||
adminSecretName: pvc-ceph-conf-combined-storageclass | ||
adminSecretNamespace: {{.Release.Namespace}} | ||
pool: rbd | ||
userId: admin | ||
userSecretName: ceph-client-key | ||
userSecretName: pvc-ceph-client-key |
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,2 @@ | ||
secrets/* | ||
templates/_secrets.tpl |
File renamed without changes.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
description: A base chart for all openstack charts | ||
name: openstack-base | ||
name: common | ||
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,7 @@ | ||
EXCLUDE := templates/* charts/* Chart.yaml requirement* values.yaml Makefile utils/* common/Chart.yaml | ||
SECRETS := $(shell find secrets -type f $(foreach e,$(EXCLUDE), -not -path "$(e)") ) | ||
|
||
templates/_secrets.tpl: Makefile $(SECRETS) | ||
echo Generating $(CURDIR)/$@ | ||
rm -f $@ | ||
for i in $(SECRETS); do printf '{{ define "'$$i'" }}' >> $@; cat $$i >> $@; printf "{{ end }}\n" >> $@; done |
File renamed without changes.
File renamed without changes.
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 @@ | ||
{{- define "template" -}} | ||
{{- $name := index . 0 -}} | ||
{{- $context := index . 1 -}} | ||
{{- $v:= $context.Template.Name | split "/" -}} | ||
{{- $n := len $v -}} | ||
{{- $last := sub $n 1 | printf "_%d" | index $v -}} | ||
{{- $wtf := $context.Template.Name | replace $last $name -}} | ||
{{ include $wtf $context }} | ||
{{- end -}} |
File renamed without changes.
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,16 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: "pvc-ceph-conf-combined-storageclass" | ||
type: kubernetes.io/rbd | ||
data: | ||
key: {{ include "secrets/ceph-client-key" . | quote }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: "pvc-ceph-client-key" | ||
type: kubernetes.io/rbd | ||
data: | ||
key: {{ include "secrets/ceph-client-key" . | quote }} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: openstack-base | ||
- name: common | ||
repository: http://localhost:8879/charts | ||
version: 0.1.0 | ||
digest: sha256:178ec6c44cf73c5d3c6d47eccee30b1b7f7e373c57af4e37fe7ea85f3549660e | ||
generated: 2016-11-25T16:24:28.454876345-08:00 | ||
digest: sha256:c6a7e430c900036912fe3fdc14213e9280c5da0b6607ce4dcf6dc95535d114fc | ||
generated: 2016-11-29T11:31:25.670403608-08:00 |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dependencies: | ||
- name: openstack-base | ||
- name: common | ||
repository: http://localhost:8879/charts | ||
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: openstack-base | ||
- name: common | ||
repository: http://localhost:8879/charts | ||
version: 0.1.0 | ||
digest: sha256:178ec6c44cf73c5d3c6d47eccee30b1b7f7e373c57af4e37fe7ea85f3549660e | ||
generated: 2016-11-25T16:24:49.79575501-08:00 | ||
digest: sha256:c6a7e430c900036912fe3fdc14213e9280c5da0b6607ce4dcf6dc95535d114fc | ||
generated: 2016-11-29T11:31:27.05384225-08:00 |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dependencies: | ||
- name: openstack-base | ||
- name: common | ||
repository: http://localhost:8879/charts | ||
version: 0.1.0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: openstack-base | ||
- name: common | ||
repository: http://localhost:8879/charts | ||
version: 0.1.0 | ||
digest: sha256:178ec6c44cf73c5d3c6d47eccee30b1b7f7e373c57af4e37fe7ea85f3549660e | ||
generated: 2016-11-25T16:24:29.266938266-08:00 | ||
digest: sha256:c6a7e430c900036912fe3fdc14213e9280c5da0b6607ce4dcf6dc95535d114fc | ||
generated: 2016-11-29T11:31:26.360492977-08:00 |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dependencies: | ||
- name: openstack-base | ||
- name: common | ||
repository: http://localhost:8879/charts | ||
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,11 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: rabbitmq-bin | ||
labels: | ||
system: openstack | ||
type: configuration | ||
component: messaging | ||
data: | ||
start_rabbitmq.sh: | | ||
{{ tuple "bin/_start_rabbit.tpl" . | include "template" | indent 4 }} |
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,18 @@ | ||
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq | ||
|
||
/etc/init.d/rabbitmq-server start | ||
|
||
rabbitmq-plugins enable rabbitmq_tracing | ||
rabbitmqctl trace_on | ||
|
||
rabbitmqctl add_user {{ .Values.auth.default_user }} {{ .Values.auth.default_pass }} || true | ||
rabbitmqctl set_permissions {{ .Values.auth.default_user }} ".*" ".*" ".*" || true | ||
|
||
rabbitmqctl add_user {{ .Values.auth.admin_user }} {{ .Values.auth.admin_pass }}|| true | ||
rabbitmqctl set_permissions {{ .Values.auth.admin_user }} ".*" ".*" ".*" || true | ||
rabbitmqctl set_user_tags {{ .Values.auth.admin_user }} administrator || true | ||
|
||
rabbitmqctl change_password guest {{ .Values.auth.default_pass }} || true | ||
rabbitmqctl set_user_tags guest monitoring || true | ||
/etc/init.d/rabbitmq-server stop | ||
exec rabbitmq-server |
This file was deleted.
Oops, something went wrong.