1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Fixed notes

This commit is contained in:
Ewout Prangsma 2018-08-10 15:40:10 +02:00
parent 8945c2af57
commit e20166794c
No known key found for this signature in database
GPG key ID: 4DBAD380D93D0698

View file

@ -117,7 +117,9 @@ description: |
home: https://arangodb.com home: https://arangodb.com
` `
kubeArangoDBValuesTemplate = ` kubeArangoDBValuesTemplate = `
# Image containing the kube-arangodb operators
Image: {{ .Image | quote }} Image: {{ .Image | quote }}
# Image pull policy for Image
ImagePullPolicy: {{ .ImagePullPolicy | quote }} ImagePullPolicy: {{ .ImagePullPolicy | quote }}
RBAC: RBAC:
Create: {{ .RBAC }} Create: {{ .RBAC }}
@ -149,23 +151,27 @@ Storage:
ServiceAccountName: {{ .Storage.Operator.ServiceAccountName | quote }} ServiceAccountName: {{ .Storage.Operator.ServiceAccountName | quote }}
ServiceType: {{ .Storage.Operator.ServiceType | quote }} ServiceType: {{ .Storage.Operator.ServiceType | quote }}
` `
kubeArangoDBNotesTemplate = ` kubeArangoDBNotesText = `
kube-arangodb has been deployed successfully! kube-arangodb has been deployed successfully!
{{ if (and .Deployment.Create .DeploymentReplication.Create) -}} Your release is named '{{ .Release.Name }}'.
{{ if and .Values.Deployment.Create .Values.DeploymentReplication.Create -}}
You can now deploy ArangoDeployment & ArangoDeploymentReplication resources. You can now deploy ArangoDeployment & ArangoDeploymentReplication resources.
{{- else if (and .Deployment.Create (not .DeploymentReplication.Create)) -}} {{- else if and .Values.Deployment.Create (not .Values.DeploymentReplication.Create) -}}
You can now deploy ArangoDeployment resources. You can now deploy ArangoDeployment resources.
{{- else if (and (not .Deployment.Create) .DeploymentReplication.Create) -}} {{- else if and (not .Values.Deployment.Create) .Values.DeploymentReplication.Create -}}
You can now deploy ArangoDeploymentReplication resources. You can now deploy ArangoDeploymentReplication resources.
{{- end }} {{- end }}
See https://docs.arangodb.com/devel/Manual/Tutorials/Kubernetes/ See https://docs.arangodb.com/devel/Manual/Tutorials/Kubernetes/
for how to get started. for how to get started.
` `
kubeArangoDBStorageNotesTemplate = ` kubeArangoDBStorageNotesText = `
kube-arangodb-storage has been deployed successfully! kube-arangodb-storage has been deployed successfully!
Your release is named '{{ .Release.Name }}'.
You can now deploy an ArangoLocalStorage resource. You can now deploy an ArangoLocalStorage resource.
See https://docs.arangodb.com/devel/Manual/Deployment/Kubernetes/StorageResource.html See https://docs.arangodb.com/devel/Manual/Deployment/Kubernetes/StorageResource.html
@ -178,12 +184,12 @@ var (
"kube-arangodb": chartTemplates{ "kube-arangodb": chartTemplates{
"Chart.yaml": kubeArangoDBChartTemplate, "Chart.yaml": kubeArangoDBChartTemplate,
"values.yaml": kubeArangoDBValuesTemplate, "values.yaml": kubeArangoDBValuesTemplate,
"templates/NOTES.txt": kubeArangoDBNotesTemplate, "templates/NOTES.txt": kubeArangoDBNotesText,
}, },
"kube-arangodb-storage": chartTemplates{ "kube-arangodb-storage": chartTemplates{
"Chart.yaml": kubeArangoDBStorageChartTemplate, "Chart.yaml": kubeArangoDBStorageChartTemplate,
"values.yaml": kubeArangoDBStorageValuesTemplate, "values.yaml": kubeArangoDBStorageValuesTemplate,
"templates/NOTES.txt": kubeArangoDBStorageNotesTemplate, "templates/NOTES.txt": kubeArangoDBStorageNotesText,
}, },
} }
) )
@ -490,11 +496,17 @@ func main() {
for groupName, chartTemplates := range chartTemplateGroups { for groupName, chartTemplates := range chartTemplateGroups {
for name, templateSource := range chartTemplates { for name, templateSource := range chartTemplates {
output := &bytes.Buffer{} output := &bytes.Buffer{}
if strings.HasSuffix(name, ".txt") {
// Plain text
output.WriteString(templateSource)
} else {
// Template
t, err := template.New(name).Funcs(tmplFuncs).Parse(templateSource) t, err := template.New(name).Funcs(tmplFuncs).Parse(templateSource)
if err != nil { if err != nil {
log.Fatalf("Failed to parse template %s: %v", name, err) log.Fatalf("Failed to parse template %s: %v", name, err)
} }
t.Execute(output, templateOptions) t.Execute(output, templateOptions)
}
// Save output // Save output
tarPath := path.Join(groupName, name) tarPath := path.Join(groupName, name)