diff --git a/Makefile b/Makefile index 0a202207c..dee2ccc3e 100644 --- a/Makefile +++ b/Makefile @@ -299,7 +299,6 @@ ifneq ($(DEPLOYMENTNAMESPACE), default) $(ROOTDIR)/scripts/kube_delete_namespace.sh $(DEPLOYMENTNAMESPACE) kubectl create namespace $(DEPLOYMENTNAMESPACE) endif - kubectl apply -f manifests/crd.yaml kubectl apply -f $(MANIFESTPATHSTORAGE) kubectl apply -f $(MANIFESTPATHDEPLOYMENT) kubectl apply -f $(MANIFESTPATHDEPLOYMENTREPLICATION) @@ -407,7 +406,6 @@ delete-operator: .PHONY: redeploy-operator redeploy-operator: delete-operator manifests - kubectl apply -f manifests/crd.yaml kubectl apply -f $(MANIFESTPATHSTORAGE) kubectl apply -f $(MANIFESTPATHDEPLOYMENT) kubectl apply -f $(MANIFESTPATHDEPLOYMENTREPLICATION) diff --git a/README.md b/README.md index 213aade4a..b7ad766fc 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,6 @@ kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/0.3.0/ ```bash DOCKERNAMESPACE= make -kubectl apply -f manifests/crd.yaml kubectl apply -f manifests/arango-deployment-dev.yaml # To use `ArangoLocalStorage`, also run kubectl apply -f manifests/arango-storage-dev.yaml diff --git a/docs/Manual/Deployment/Kubernetes/Usage.md b/docs/Manual/Deployment/Kubernetes/Usage.md index 1079310cf..dac960c3b 100644 --- a/docs/Manual/Deployment/Kubernetes/Usage.md +++ b/docs/Manual/Deployment/Kubernetes/Usage.md @@ -40,7 +40,6 @@ run (replace `` with the version of the operator that you want to insta ```bash export URLPREFIX=https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests -kubectl apply -f $URLPREFIX/crd.yaml kubectl apply -f $URLPREFIX/arango-deployment.yaml ``` diff --git a/docs/Manual/Tutorials/Kubernetes/README.md b/docs/Manual/Tutorials/Kubernetes/README.md index a776fc6f0..5b641986d 100644 --- a/docs/Manual/Tutorials/Kubernetes/README.md +++ b/docs/Manual/Tutorials/Kubernetes/README.md @@ -37,7 +37,6 @@ For now, any recent Kubernetes cluster will do (e.g. `minikube`). Then run (replace `` with the version of the operator that you want to install): ```bash -kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/crd.yaml kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/arango-deployment.yaml # Optional kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/arango-storage.yaml diff --git a/manifests/crd.yaml b/manifests/crd.yaml deleted file mode 100644 index 7cce03231..000000000 --- a/manifests/crd.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: arangodeployments.database.arangodb.com -spec: - group: database.arangodb.com - names: - kind: ArangoDeployment - listKind: ArangoDeploymentList - plural: arangodeployments - shortNames: - - arangodb - - arango - singular: arangodeployment - scope: Namespaced - version: v1alpha - ---- - -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: arangodeploymentreplications.replication.database.arangodb.com -spec: - group: replication.database.arangodb.com - names: - kind: ArangoDeploymentReplication - listKind: ArangoDeploymentReplicationList - plural: arangodeploymentreplications - shortNames: - - arangorepl - singular: arangodeploymentreplication - scope: Namespaced - version: v1alpha - ---- - -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: arangolocalstorages.storage.arangodb.com -spec: - group: storage.arangodb.com - names: - kind: ArangoLocalStorage - listKind: ArangoLocalStorageList - plural: arangolocalstorages - shortNames: - - arangostorage - singular: arangolocalstorage - scope: Cluster - version: v1alpha diff --git a/manifests/templates/deployment-replication/crd.yaml b/manifests/templates/deployment-replication/crd.yaml new file mode 100644 index 000000000..829a06333 --- /dev/null +++ b/manifests/templates/deployment-replication/crd.yaml @@ -0,0 +1,15 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: arangodeploymentreplications.replication.database.arangodb.com +spec: + group: replication.database.arangodb.com + names: + kind: ArangoDeploymentReplication + listKind: ArangoDeploymentReplicationList + plural: arangodeploymentreplications + shortNames: + - arangorepl + singular: arangodeploymentreplication + scope: Namespaced + version: v1alpha diff --git a/manifests/templates/deployment/crd.yaml b/manifests/templates/deployment/crd.yaml new file mode 100644 index 000000000..22959f997 --- /dev/null +++ b/manifests/templates/deployment/crd.yaml @@ -0,0 +1,16 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: arangodeployments.database.arangodb.com +spec: + group: database.arangodb.com + names: + kind: ArangoDeployment + listKind: ArangoDeploymentList + plural: arangodeployments + shortNames: + - arangodb + - arango + singular: arangodeployment + scope: Namespaced + version: v1alpha diff --git a/manifests/templates/storage/crd.yaml b/manifests/templates/storage/crd.yaml new file mode 100644 index 000000000..b8c86f6a9 --- /dev/null +++ b/manifests/templates/storage/crd.yaml @@ -0,0 +1,15 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: arangolocalstorages.storage.arangodb.com +spec: + group: storage.arangodb.com + names: + kind: ArangoLocalStorage + listKind: ArangoLocalStorageList + plural: arangolocalstorages + shortNames: + - arangostorage + singular: arangolocalstorage + scope: Cluster + version: v1alpha diff --git a/scripts/patch_readme.sh b/scripts/patch_readme.sh index 523351a5b..e4cdfd084 100755 --- a/scripts/patch_readme.sh +++ b/scripts/patch_readme.sh @@ -11,7 +11,6 @@ if [ -z $VERSION ]; then fi f=README.md -sed -e "s@^kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/.*/manifests/crd.yaml\$@kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/${VERSION}/manifests/crd.yaml@g" -i "" $f sed -e "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" -i "" $f sed -e "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" -i "" $f sed -e "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" -i "" $f diff --git a/tools/manifests/manifest_builder.go b/tools/manifests/manifest_builder.go index 7e0d7842b..c611c7085 100644 --- a/tools/manifests/manifest_builder.go +++ b/tools/manifests/manifest_builder.go @@ -56,16 +56,19 @@ var ( AllowChaos bool } 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"}, } storageTemplateNames = []Template{ + Template{Name: "crd.yaml"}, Template{Name: "rbac.yaml", Predicate: hasRBAC}, Template{Name: "deployment.yaml"}, Template{Name: "service.yaml"},