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

Added extra yaml for CRDs.

This commit is contained in:
lamai93 2018-10-30 17:13:06 +01:00
parent 1a6101c0b2
commit 2b23bcbbdb
6 changed files with 35 additions and 3 deletions

View file

@ -39,6 +39,8 @@ it is intended to be.
## Installation of latest release using Helm
```bash
# The following will install the custom resources required by the operators.
helm install https://github.com/arangodb/kube-arangodb/releases/download/0.3.2/kube-arangodb-crd.tgz
# The following will install the operator for `ArangoDeployment` &
# `ArangoDeplomentReplication` resources.
helm install https://github.com/arangodb/kube-arangodb/releases/download/0.3.1/kube-arangodb.tgz
@ -49,6 +51,7 @@ helm install https://github.com/arangodb/kube-arangodb/releases/download/0.3.1/k
## Installation of latest release using Kubectl
```bash
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/0.3.2/manifests/arango-crd.yaml
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/0.3.1/manifests/arango-deployment.yaml
# To use `ArangoLocalStorage`, also run
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/0.3.1/manifests/arango-storage.yaml

View file

@ -2,3 +2,4 @@ arango-deployment-dev.yaml
arango-deployment-replication-dev.yaml
arango-storage-dev.yaml
arango-test-dev.yaml
arango-crd-dev.yaml

View file

@ -21,13 +21,15 @@ function replaceInFile {
sed -i --expression "${EXPR}" ${FILE}
;;
esac
}
}arango-deployment-operator-5bbc447b4c
f=README.md
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/arango-crd.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/arango-crd.yaml@g" ${f}
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/arango-deployment.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/arango-deployment.yaml@g" ${f}
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/arango-deployment-replication.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/arango-deployment-replication.yaml@g" ${f}
replaceInFile "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/arango-storage.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/arango-storage.yaml@g" ${f}
replaceInFile "s@^helm install https://github.com/arangodb/kube-arangodb/releases/download/.*/kube-arangodb-crd.tgz\$@helm install https://github.com/arangodb/kube-arangodb/releases/download/${VERSION}/kube-arangodb-crd.tgz@g" ${f}
replaceInFile "s@^helm install https://github.com/arangodb/kube-arangodb/releases/download/.*/kube-arangodb.tgz\$@helm install https://github.com/arangodb/kube-arangodb/releases/download/${VERSION}/kube-arangodb.tgz@g" ${f}
replaceInFile "s@^helm install https://github.com/arangodb/kube-arangodb/releases/download/.*/kube-arangodb-storage.tgz\$@helm install https://github.com/arangodb/kube-arangodb/releases/download/${VERSION}/kube-arangodb-storage.tgz@g" ${f}

View file

@ -55,14 +55,16 @@ var (
RBAC bool
AllowChaos bool
}
crdTemplateNames = []Template{
Template{Name: "deployment.yaml"},
Template{Name: "deployment-replication.yaml"},
}
deploymentTemplateNames = []Template{
Template{Name: "crd.yaml"},
Template{Name: "rbac.yaml", Predicate: hasRBAC},
Template{Name: "deployment.yaml"},
Template{Name: "service.yaml"},
}
deploymentReplicationTemplateNames = []Template{
Template{Name: "crd.yaml"},
Template{Name: "rbac.yaml", Predicate: hasRBAC},
Template{Name: "deployment-replication.yaml"},
Template{Name: "service.yaml"},
@ -119,6 +121,15 @@ description: |
Kube-ArangoDB-Storage is a cluster-wide operator used to provision PersistentVolumes on disks attached locally to Nodes
home: https://arangodb.com
`
kubeArangoDBCRDChartTemplate = `
apiVersion: v1
name: kube-arangodb-crd
version: "{{ .Version }}"
description: |
Kube-ArangoDB-crd contains the custom resource definitions for ArangoDeployment and ArangoDeploymentReplication resources.
home: https://arangodb.com
`
kubeArangoDBValuesTemplate = `
# Image containing the kube-arangodb operators
Image: {{ .Image | quote }}
@ -155,6 +166,8 @@ Storage:
ServiceAccountName: {{ .Storage.Operator.ServiceAccountName | quote }}
ServiceType: {{ .Storage.Operator.ServiceType | quote }}
`
kubeArangoDBCRDValuesTemplate = ``
kubeArangoDBNotesText = `
kube-arangodb has been deployed successfully!
@ -180,11 +193,23 @@ You can now deploy an ArangoLocalStorage resource.
See https://docs.arangodb.com/devel/Manual/Deployment/Kubernetes/StorageResource.html
for further instructions.
`
kubeArangoDBCRDNotesText = `
kube-arangodb-crd has been deployed successfully!
Your release is named '{{ .Release.Name }}'.
You can now continue install kube-arangodb chart.
`
)
var (
chartTemplateGroups = map[string]chartTemplates{
"kube-arangodb-crd": chartTemplates{
"Chart.yaml": kubeArangoDBCRDChartTemplate,
"values.yaml": kubeArangoDBCRDValuesTemplate,
"templates/NOTES.txt": kubeArangoDBCRDNotesText,
},
"kube-arangodb": chartTemplates{
"Chart.yaml": kubeArangoDBChartTemplate,
"values.yaml": kubeArangoDBValuesTemplate,
@ -272,6 +297,7 @@ func main() {
// Prepare templates to include
templateInfoSet := map[string]TemplateGroup{
"crd": TemplateGroup{ChartName: "kube-arangodb-crd", Templates: crdTemplateNames},
"deployment": TemplateGroup{ChartName: "kube-arangodb", Templates: deploymentTemplateNames},
"deployment-replication": TemplateGroup{ChartName: "kube-arangodb", Templates: deploymentReplicationTemplateNames},
"storage": TemplateGroup{ChartName: "kube-arangodb-storage", Templates: storageTemplateNames},