mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
Merge pull request #287 from arangodb/bug-fix/extra-crd-yaml
Bug fix/extra crd yaml
This commit is contained in:
commit
0b606b0fdf
9 changed files with 42 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -52,6 +52,7 @@ ifndef MANIFESTSUFFIX
|
|||
MANIFESTSUFFIX := -dev
|
||||
endif
|
||||
endif
|
||||
MANIFESTPATHCRD := manifests/arango-crd$(MANIFESTSUFFIX).yaml
|
||||
MANIFESTPATHDEPLOYMENT := manifests/arango-deployment$(MANIFESTSUFFIX).yaml
|
||||
MANIFESTPATHDEPLOYMENTREPLICATION := manifests/arango-deployment-replication$(MANIFESTSUFFIX).yaml
|
||||
MANIFESTPATHSTORAGE := manifests/arango-storage$(MANIFESTSUFFIX).yaml
|
||||
|
@ -236,6 +237,7 @@ endif
|
|||
|
||||
.PHONY: manifests
|
||||
manifests: $(GOBUILDDIR)
|
||||
echo Building manifests
|
||||
GOPATH=$(GOBUILDDIR) go run $(ROOTDIR)/tools/manifests/manifest_builder.go \
|
||||
--output-suffix=$(MANIFESTSUFFIX) \
|
||||
--image=$(OPERATORIMAGE) \
|
||||
|
@ -299,6 +301,7 @@ ifneq ($(DEPLOYMENTNAMESPACE), default)
|
|||
$(ROOTDIR)/scripts/kube_delete_namespace.sh $(DEPLOYMENTNAMESPACE)
|
||||
kubectl create namespace $(DEPLOYMENTNAMESPACE)
|
||||
endif
|
||||
kubectl apply -f $(MANIFESTPATHCRD)
|
||||
kubectl apply -f $(MANIFESTPATHSTORAGE)
|
||||
kubectl apply -f $(MANIFESTPATHDEPLOYMENT)
|
||||
kubectl apply -f $(MANIFESTPATHDEPLOYMENTREPLICATION)
|
||||
|
@ -403,9 +406,11 @@ delete-operator:
|
|||
kubectl delete -f $(MANIFESTPATHDEPLOYMENT) --ignore-not-found
|
||||
kubectl delete -f $(MANIFESTPATHDEPLOYMENTREPLICATION) --ignore-not-found
|
||||
kubectl delete -f $(MANIFESTPATHSTORAGE) --ignore-not-found
|
||||
kubectl delete -f $(MANIFESTPATHCRD) --ignore-not-found
|
||||
|
||||
.PHONY: redeploy-operator
|
||||
redeploy-operator: delete-operator manifests
|
||||
kubectl apply -f $(MANIFESTPATHCRD)
|
||||
kubectl apply -f $(MANIFESTPATHSTORAGE)
|
||||
kubectl apply -f $(MANIFESTPATHDEPLOYMENT)
|
||||
kubectl apply -f $(MANIFESTPATHDEPLOYMENTREPLICATION)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,6 +14,7 @@ run (replace `<version>` with the version of the operator that you want to insta
|
|||
|
||||
```bash
|
||||
export URLPREFIX=https://github.com/arangodb/kube-arangodb/releases/download/<version>
|
||||
helm install $URLPREFIX/kube-arangodb-crd.tgz
|
||||
helm install $URLPREFIX/kube-arangodb.tgz
|
||||
```
|
||||
|
||||
|
@ -40,6 +41,7 @@ run (replace `<version>` with the version of the operator that you want to insta
|
|||
|
||||
```bash
|
||||
export URLPREFIX=https://raw.githubusercontent.com/arangodb/kube-arangodb/<version>/manifests
|
||||
kubectl apply -f $URLPREFIX/arango-crd.yaml
|
||||
kubectl apply -f $URLPREFIX/arango-deployment.yaml
|
||||
```
|
||||
|
||||
|
|
1
manifests/.gitignore
vendored
1
manifests/.gitignore
vendored
|
@ -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
|
||||
|
|
|
@ -25,9 +25,11 @@ function replaceInFile {
|
|||
|
||||
|
||||
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}
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -48,6 +48,7 @@ var (
|
|||
binaries = map[string]string{
|
||||
"kube-arangodb.tgz": "charts/kube-arangodb.tgz",
|
||||
"kube-arangodb-storage.tgz": "charts/kube-arangodb-storage.tgz",
|
||||
"kube-arangodb-crd.tgz": "charts/kube-arangodb-crd.tgz",
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue