From c40209b0ffcf21fa4fd8640485d809859506e3e7 Mon Sep 17 00:00:00 2001 From: Bala FA Date: Mon, 2 Dec 2024 10:46:43 +0530 Subject: [PATCH] Remove unsupported directpv operator (#984) Signed-off-by: Bala.FA --- operator/Dockerfile | 7 - operator/Makefile | 211 ----------- operator/PROJECT | 20 -- operator/bundle.Dockerfile | 20 -- operator/bundle/ci.yaml | 1 - .../charts.quay.io_directpvcharts.yaml | 50 --- ...er-manager-metrics-service_v1_service.yaml | 23 -- ...c.authorization.k8s.io_v1_clusterrole.yaml | 17 - ...rectpv-operator.clusterserviceversion.yaml | 337 ------------------ operator/bundle/metadata/annotations.yaml | 16 - operator/bundle/tests/scorecard/config.yaml | 70 ---- .../bases/charts.quay.io_directpvcharts.yaml | 44 --- operator/config/crd/kustomization.yaml | 6 - operator/config/default/kustomization.yaml | 30 -- .../default/manager_auth_proxy_patch.yaml | 56 --- .../config/default/manager_config_patch.yaml | 10 - operator/config/manager/kustomization.yaml | 8 - operator/config/manager/manager.yaml | 101 ------ ...rectpv-operator.clusterserviceversion.yaml | 51 --- operator/config/manifests/kustomization.yaml | 7 - operator/config/prometheus/kustomization.yaml | 2 - operator/config/prometheus/monitor.yaml | 26 -- .../rbac/auth_proxy_client_clusterrole.yaml | 16 - operator/config/rbac/auth_proxy_role.yaml | 24 -- .../config/rbac/auth_proxy_role_binding.yaml | 19 - operator/config/rbac/auth_proxy_service.yaml | 21 -- .../rbac/directpvchart_editor_role.yaml | 31 -- .../rbac/directpvchart_viewer_role.yaml | 27 -- operator/config/rbac/kustomization.yaml | 18 - .../config/rbac/leader_election_role.yaml | 44 --- .../rbac/leader_election_role_binding.yaml | 19 - operator/config/rbac/role.yaml | 95 ----- operator/config/rbac/role_binding.yaml | 19 - operator/config/rbac/service_account.yaml | 12 - .../charts_v1alpha1_directpvchart.yaml | 45 --- operator/config/samples/kustomization.yaml | 4 - operator/config/scorecard/bases/config.yaml | 7 - operator/config/scorecard/kustomization.yaml | 16 - .../scorecard/patches/basic.config.yaml | 10 - .../config/scorecard/patches/olm.config.yaml | 50 --- operator/examples/my-directpv.yaml | 23 -- operator/helm-charts/.helmignore | 23 -- .../helm-charts/directpv-chart/Chart.yaml | 10 - .../directpv-chart/templates/CSIDriver.yaml | 21 -- .../directpv-chart/templates/ClusterRole.yaml | 173 --------- .../templates/ClusterRoleBinding.yaml | 24 -- .../directpv-chart/templates/DaemonSet.yaml | 234 ------------ .../directpv-chart/templates/Deployment.yaml | 122 ------- .../directpv-chart/templates/Namespace.yaml | 19 - .../directpv-chart/templates/Role.yaml | 29 -- .../directpv-chart/templates/RoleBinding.yaml | 25 -- .../templates/ServiceAccount.yaml | 16 - .../templates/StorageClass.yaml | 28 -- .../directpvdrives.directpv.min.io.yaml | 162 --------- .../directpvinitrequests.directpv.min.io.yaml | 99 ----- .../directpvnodes.directpv.min.io.yaml | 164 --------- .../directpvvolumes.directpv.min.io.yaml | 156 -------- .../helm-charts/directpv-chart/values.yaml | 82 ----- operator/watches.yaml | 6 - release-operator.sh | 178 --------- 60 files changed, 3184 deletions(-) delete mode 100644 operator/Dockerfile delete mode 100644 operator/Makefile delete mode 100644 operator/PROJECT delete mode 100644 operator/bundle.Dockerfile delete mode 100644 operator/bundle/ci.yaml delete mode 100644 operator/bundle/manifests/charts.quay.io_directpvcharts.yaml delete mode 100644 operator/bundle/manifests/directpv-operator-controller-manager-metrics-service_v1_service.yaml delete mode 100644 operator/bundle/manifests/directpv-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml delete mode 100644 operator/bundle/manifests/minio-directpv-operator.clusterserviceversion.yaml delete mode 100644 operator/bundle/metadata/annotations.yaml delete mode 100644 operator/bundle/tests/scorecard/config.yaml delete mode 100644 operator/config/crd/bases/charts.quay.io_directpvcharts.yaml delete mode 100644 operator/config/crd/kustomization.yaml delete mode 100644 operator/config/default/kustomization.yaml delete mode 100644 operator/config/default/manager_auth_proxy_patch.yaml delete mode 100644 operator/config/default/manager_config_patch.yaml delete mode 100644 operator/config/manager/kustomization.yaml delete mode 100644 operator/config/manager/manager.yaml delete mode 100644 operator/config/manifests/bases/minio-directpv-operator.clusterserviceversion.yaml delete mode 100644 operator/config/manifests/kustomization.yaml delete mode 100644 operator/config/prometheus/kustomization.yaml delete mode 100644 operator/config/prometheus/monitor.yaml delete mode 100644 operator/config/rbac/auth_proxy_client_clusterrole.yaml delete mode 100644 operator/config/rbac/auth_proxy_role.yaml delete mode 100644 operator/config/rbac/auth_proxy_role_binding.yaml delete mode 100644 operator/config/rbac/auth_proxy_service.yaml delete mode 100644 operator/config/rbac/directpvchart_editor_role.yaml delete mode 100644 operator/config/rbac/directpvchart_viewer_role.yaml delete mode 100644 operator/config/rbac/kustomization.yaml delete mode 100644 operator/config/rbac/leader_election_role.yaml delete mode 100644 operator/config/rbac/leader_election_role_binding.yaml delete mode 100644 operator/config/rbac/role.yaml delete mode 100644 operator/config/rbac/role_binding.yaml delete mode 100644 operator/config/rbac/service_account.yaml delete mode 100644 operator/config/samples/charts_v1alpha1_directpvchart.yaml delete mode 100644 operator/config/samples/kustomization.yaml delete mode 100644 operator/config/scorecard/bases/config.yaml delete mode 100644 operator/config/scorecard/kustomization.yaml delete mode 100644 operator/config/scorecard/patches/basic.config.yaml delete mode 100644 operator/config/scorecard/patches/olm.config.yaml delete mode 100644 operator/examples/my-directpv.yaml delete mode 100644 operator/helm-charts/.helmignore delete mode 100644 operator/helm-charts/directpv-chart/Chart.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/CSIDriver.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/ClusterRole.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/ClusterRoleBinding.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/DaemonSet.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/Deployment.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/Namespace.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/Role.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/RoleBinding.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/ServiceAccount.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/StorageClass.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/directpvdrives.directpv.min.io.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/directpvinitrequests.directpv.min.io.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/directpvnodes.directpv.min.io.yaml delete mode 100644 operator/helm-charts/directpv-chart/templates/directpvvolumes.directpv.min.io.yaml delete mode 100644 operator/helm-charts/directpv-chart/values.yaml delete mode 100644 operator/watches.yaml delete mode 100755 release-operator.sh diff --git a/operator/Dockerfile b/operator/Dockerfile deleted file mode 100644 index 161558a5..00000000 --- a/operator/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -# Build the manager binary -FROM quay.io/operator-framework/helm-operator:v1.29.0 - -ENV HOME=/opt/helm -COPY watches.yaml ${HOME}/watches.yaml -COPY helm-charts ${HOME}/helm-charts -WORKDIR ${HOME} diff --git a/operator/Makefile b/operator/Makefile deleted file mode 100644 index 32399c13..00000000 --- a/operator/Makefile +++ /dev/null @@ -1,211 +0,0 @@ -# VERSION defines the project version for the bundle. -# Update this value when you upgrade the version of your project. -# To re-generate a bundle for another specific version without changing the standard setup, you can: -# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) -# - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 4.0.7 - -# CHANNELS define the bundle channels used in the bundle. -# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") -# To re-generate a bundle for other specific channels without changing the standard setup, you can: -# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=candidate,fast,stable) -# - use environment variables to overwrite this value (e.g export CHANNELS="candidate,fast,stable") -ifneq ($(origin CHANNELS), undefined) -BUNDLE_CHANNELS := --channels=$(CHANNELS) -endif - -# DEFAULT_CHANNEL defines the default channel used in the bundle. -# Add a new line here if you would like to change its default config. (E.g DEFAULT_CHANNEL = "stable") -# To re-generate a bundle for any other default channel without changing the default setup, you can: -# - use the DEFAULT_CHANNEL as arg of the bundle target (e.g make bundle DEFAULT_CHANNEL=stable) -# - use environment variables to overwrite this value (e.g export DEFAULT_CHANNEL="stable") -ifneq ($(origin DEFAULT_CHANNEL), undefined) -BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL) -endif -BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) - -# IMAGE_TAG_BASE defines the docker.io namespace and part of the image name for remote images. -# This variable is used to construct full image tags for bundle and catalog images. -# -# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both -# quay.io/directpv-operator-bundle:$VERSION and quay.io/directpv-operator-catalog:$VERSION. -IMAGE_TAG_BASE ?= quay.io/minio/directpv-operator - -# BUNDLE_IMG defines the image:tag used for the bundle. -# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=/:) -BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION) - -# BUNDLE_GEN_FLAGS are the flags passed to the operator-sdk generate bundle command -BUNDLE_GEN_FLAGS ?= -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) - -# USE_IMAGE_DIGESTS defines if images are resolved via tags or digests -# You can enable this value if you would like to use SHA Based Digests -# To enable set flag to true -USE_IMAGE_DIGESTS ?= false -ifeq ($(USE_IMAGE_DIGESTS), true) - BUNDLE_GEN_FLAGS += --use-image-digests -endif - -# Image URL to use all building/pushing image targets -# IMG ?= controller:latest -IMG ?= $(IMAGE_TAG_BASE):$(VERSION) - -.PHONY: all -all: docker-build - -##@ General - -# The help target prints out all targets with their descriptions organized -# beneath their categories. The categories are represented by '##@' and the -# target descriptions by '##'. The awk commands is responsible for reading the -# entire set of makefiles included in this invocation, looking for lines of the -# file as xyz: ## something, and then pretty-format the target and help. Then, -# if there's a line with ##@ something, that gets pretty-printed as a category. -# More info on the usage of ANSI control characters for terminal formatting: -# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters -# More info on the awk command: -# http://linuxcommand.org/lc3_adv_awk.php - -.PHONY: help -help: ## Display this help. - @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) - -##@ Build - -.PHONY: run -run: helm-operator ## Run against the configured Kubernetes cluster in ~/.kube/config - $(HELM_OPERATOR) run - -.PHONY: docker-build -docker-build: ## Build docker image with the manager. - docker buildx build --platform linux/amd64 -t ${IMG} . - -.PHONY: docker-push -docker-push: ## Push docker image with the manager. - docker push ${IMG} - -# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple -# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to: -# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/ -# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/ -# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=> than the export will fail) -# To properly provided solutions that supports more than one platform you should use this option. -PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le -.PHONY: docker-buildx -docker-buildx: test ## Build and push docker image for the manager for cross-platform support - # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile - sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - - docker buildx create --name project-v3-builder - docker buildx use project-v3-builder - - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . - - docker buildx rm project-v3-builder - rm Dockerfile.cross - -##@ Deployment - -.PHONY: install -install: kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build config/crd | kubectl apply -f - - -.PHONY: uninstall -uninstall: kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build config/crd | kubectl delete -f - - -.PHONY: deploy -deploy: kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. - cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} - $(KUSTOMIZE) build config/default | kubectl apply -f - - -.PHONY: undeploy -undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build config/default | kubectl delete -f - - -OS := $(shell uname -s | tr '[:upper:]' '[:lower:]') -ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') - -.PHONY: kustomize -KUSTOMIZE = $(shell pwd)/bin/kustomize -kustomize: ## Download kustomize locally if necessary. -ifeq (,$(wildcard $(KUSTOMIZE))) -ifeq (,$(shell which kustomize 2>/dev/null)) - @{ \ - set -e ;\ - mkdir -p $(dir $(KUSTOMIZE)) ;\ - curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.7/kustomize_v4.5.7_$(OS)_$(ARCH).tar.gz | \ - tar xzf - -C bin/ ;\ - } -else -KUSTOMIZE = $(shell which kustomize) -endif -endif - -.PHONY: helm-operator -HELM_OPERATOR = $(shell pwd)/bin/helm-operator -helm-operator: ## Download helm-operator locally if necessary, preferring the $(pwd)/bin path over global if both exist. -ifeq (,$(wildcard $(HELM_OPERATOR))) -ifeq (,$(shell which helm-operator 2>/dev/null)) - @{ \ - set -e ;\ - mkdir -p $(dir $(HELM_OPERATOR)) ;\ - curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.29.0/helm-operator_$(OS)_$(ARCH) ;\ - chmod +x $(HELM_OPERATOR) ;\ - } -else -HELM_OPERATOR = $(shell which helm-operator) -endif -endif - -.PHONY: bundle -bundle: kustomize ## Generate bundle manifests and metadata, then validate generated files. - operator-sdk generate kustomize manifests -q - cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) - $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS) - operator-sdk bundle validate ./bundle - -.PHONY: bundle-build -bundle-build: ## Build the bundle image. - docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . - -.PHONY: bundle-push -bundle-push: ## Push the bundle image. - $(MAKE) docker-push IMG=$(BUNDLE_IMG) - -.PHONY: opm -OPM = ./bin/opm -opm: ## Download opm locally if necessary. -ifeq (,$(wildcard $(OPM))) -ifeq (,$(shell which opm 2>/dev/null)) - @{ \ - set -e ;\ - mkdir -p $(dir $(OPM)) ;\ - curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.23.0/$(OS)-$(ARCH)-opm ;\ - chmod +x $(OPM) ;\ - } -else -OPM = $(shell which opm) -endif -endif - -# A comma-separated list of bundle images (e.g. make catalog-build BUNDLE_IMGS=example.com/operator-bundle:v0.1.0,example.com/operator-bundle:v0.2.0). -# These images MUST exist in a registry and be pull-able. -BUNDLE_IMGS ?= $(BUNDLE_IMG) - -# The image tag given to the resulting catalog image (e.g. make catalog-build CATALOG_IMG=example.com/operator-catalog:v0.2.0). -CATALOG_IMG ?= $(IMAGE_TAG_BASE)-catalog:v$(VERSION) - -# Set CATALOG_BASE_IMG to an existing catalog image tag to add $BUNDLE_IMGS to that image. -ifneq ($(origin CATALOG_BASE_IMG), undefined) -FROM_INDEX_OPT := --from-index $(CATALOG_BASE_IMG) -endif - -# Build a catalog image by adding bundle images to an empty catalog using the operator package manager tool, 'opm'. -# This recipe invokes 'opm' in 'semver' bundle add mode. For more information on add modes, see: -# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator -.PHONY: catalog-build -catalog-build: opm ## Build a catalog image. - $(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) - -# Push the catalog image. -.PHONY: catalog-push -catalog-push: ## Push a catalog image. - $(MAKE) docker-push IMG=$(CATALOG_IMG) diff --git a/operator/PROJECT b/operator/PROJECT deleted file mode 100644 index 456ccab7..00000000 --- a/operator/PROJECT +++ /dev/null @@ -1,20 +0,0 @@ -# Code generated by tool. DO NOT EDIT. -# This file is used to track the info used to scaffold your project -# and allow the plugins properly work. -# More info: https://book.kubebuilder.io/reference/project-config.html -domain: quay.io -layout: -- helm.sdk.operatorframework.io/v1 -plugins: - manifests.sdk.operatorframework.io/v2: {} - scorecard.sdk.operatorframework.io/v2: {} -projectName: directpv-operator -resources: -- api: - crdVersion: v1 - namespaced: true - domain: quay.io - group: charts - kind: DirectPVChart - version: v1alpha1 -version: "3" diff --git a/operator/bundle.Dockerfile b/operator/bundle.Dockerfile deleted file mode 100644 index 211952ce..00000000 --- a/operator/bundle.Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=minio-directpv-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.31.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=helm.sdk.operatorframework.io/v1 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY bundle/manifests /manifests/ -COPY bundle/metadata /metadata/ -COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/operator/bundle/ci.yaml b/operator/bundle/ci.yaml deleted file mode 100644 index f0fc6ae2..00000000 --- a/operator/bundle/ci.yaml +++ /dev/null @@ -1 +0,0 @@ -cert_project_id: 65130298e32d35ffc65f5094 diff --git a/operator/bundle/manifests/charts.quay.io_directpvcharts.yaml b/operator/bundle/manifests/charts.quay.io_directpvcharts.yaml deleted file mode 100644 index a9a11e64..00000000 --- a/operator/bundle/manifests/charts.quay.io_directpvcharts.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: directpvcharts.charts.quay.io -spec: - group: charts.quay.io - names: - kind: DirectPVChart - listKind: DirectPVChartList - plural: directpvcharts - singular: directpvchart - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: DirectPVChart is the Schema for the directpvcharts API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the desired state of DirectPVChart - type: object - x-kubernetes-preserve-unknown-fields: true - status: - description: Status defines the observed state of DirectPVChart - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/operator/bundle/manifests/directpv-operator-controller-manager-metrics-service_v1_service.yaml b/operator/bundle/manifests/directpv-operator-controller-manager-metrics-service_v1_service.yaml deleted file mode 100644 index f8e97cf2..00000000 --- a/operator/bundle/manifests/directpv-operator-controller-manager-metrics-service_v1_service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/instance: controller-manager-metrics-service - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: service - app.kubernetes.io/part-of: directpv-operator - control-plane: controller-manager - name: directpv-operator-controller-manager-metrics-service -spec: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - selector: - control-plane: controller-manager -status: - loadBalancer: {} diff --git a/operator/bundle/manifests/directpv-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml b/operator/bundle/manifests/directpv-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml deleted file mode 100644 index b9139efc..00000000 --- a/operator/bundle/manifests/directpv-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/instance: metrics-reader - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: clusterrole - app.kubernetes.io/part-of: directpv-operator - name: directpv-operator-metrics-reader -rules: -- nonResourceURLs: - - /metrics - verbs: - - get diff --git a/operator/bundle/manifests/minio-directpv-operator.clusterserviceversion.yaml b/operator/bundle/manifests/minio-directpv-operator.clusterserviceversion.yaml deleted file mode 100644 index 9e7c5adb..00000000 --- a/operator/bundle/manifests/minio-directpv-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,337 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "charts.quay.io/v1alpha1", - "kind": "DirectPVChart", - "metadata": { - "name": "directpvchart-sample" - }, - "spec": { - "affinity": {}, - "autoscaling": { - "enabled": false, - "maxReplicas": 100, - "minReplicas": 1, - "targetCPUUtilizationPercentage": 80 - }, - "fullnameOverride": "", - "image": { - "pullPolicy": "IfNotPresent", - "repository": "nginx", - "tag": "" - }, - "imagePullSecrets": [], - "ingress": { - "annotations": {}, - "className": "", - "enabled": false, - "hosts": [ - { - "host": "chart-example.local", - "paths": [ - { - "path": "/", - "pathType": "ImplementationSpecific" - } - ] - } - ], - "tls": [] - }, - "nameOverride": "", - "nodeSelector": {}, - "podAnnotations": {}, - "podSecurityContext": {}, - "replicaCount": 1, - "resources": {}, - "securityContext": {}, - "service": { - "port": 80, - "type": "ClusterIP" - }, - "serviceAccount": { - "annotations": {}, - "create": true, - "name": "" - }, - "tolerations": [] - } - } - ] - capabilities: Basic Install - createdAt: "2023-12-27T17:15:14Z" - operators.operatorframework.io/builder: operator-sdk-v1.31.0 - operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1 - name: minio-directpv-operator.v4.0.10 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - kind: DirectPVChart - name: directpvcharts.charts.quay.io - version: v1alpha1 - description: Minio DirectPV Operator manages DirectPV deployments. - displayName: DirectPV - icon: - - base64data: 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 - mediatype: image/png - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - apiGroups: - - "" - resources: - - secrets - verbs: - - '*' - - apiGroups: - - "" - resources: - - events - verbs: - - create - - apiGroups: - - charts.quay.io - resources: - - directpvcharts - - directpvcharts/status - - directpvcharts/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - '*' - - apiGroups: - - storage.k8s.io - resources: - - csidrivers - - storageclasses - verbs: - - '*' - - apiGroups: - - apiextensions.k8s.io - resources: - - customresourcedefinitions - verbs: - - '*' - - apiGroups: - - rbac.authorization.k8s.io - resources: - - clusterrolebindings - - clusterroles - verbs: - - '*' - - apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - '*' - - apiGroups: - - rbac.authorization.k8s.io - resources: - - rolebindings - - roles - verbs: - - '*' - - apiGroups: - - apps - resources: - - daemonsets - - deployments - verbs: - - '*' - - apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create - - apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create - serviceAccountName: directpv-operator-controller-manager - deployments: - - label: - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/instance: controller-manager - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: deployment - app.kubernetes.io/part-of: directpv-operator - control-plane: controller-manager - name: directpv-operator-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: manager - labels: - control-plane: controller-manager - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux - containers: - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - - args: - - --health-probe-bind-address=:8081 - - --metrics-bind-address=127.0.0.1:8080 - - --leader-elect - - --leader-election-id=directpv-operator - image: quay.io/minio/directpv-operator@sha256:a1a462e2d5194b2b3460f59d37f6969d255ef6e081a3366961d3f2d8f8590b5c - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - name: manager - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 10m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - securityContext: - runAsNonRoot: true - serviceAccountName: directpv-operator-controller-manager - terminationGracePeriodSeconds: 10 - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - serviceAccountName: directpv-operator-controller-manager - strategy: deployment - installModes: - - supported: false - type: OwnNamespace - - supported: false - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - DirectPV - links: - - name: Minio DirectPV Operator - url: https://min.io/directpv - maintainers: - - email: dev@minio.io - name: DirectPV - maturity: alpha - provider: - name: DirectPV - url: https://min.io/directpv - relatedImages: - - image: quay.io/minio/directpv-operator@sha256:a1a462e2d5194b2b3460f59d37f6969d255ef6e081a3366961d3f2d8f8590b5c - name: manager - - image: gcr.io/kubebuilder/kube-rbac-proxy@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 - name: kube-rbac-proxy - version: 4.0.10 diff --git a/operator/bundle/metadata/annotations.yaml b/operator/bundle/metadata/annotations.yaml deleted file mode 100644 index 67571150..00000000 --- a/operator/bundle/metadata/annotations.yaml +++ /dev/null @@ -1,16 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: minio-directpv-operator - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.31.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: helm.sdk.operatorframework.io/v1 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ - # Annotations to specify OCP versions compatibility. - com.redhat.openshift.versions: v4.8-v4.13 diff --git a/operator/bundle/tests/scorecard/config.yaml b/operator/bundle/tests/scorecard/config.yaml deleted file mode 100644 index 4eac868c..00000000 --- a/operator/bundle/tests/scorecard/config.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-crds-have-resources-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-spec-descriptors-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-status-descriptors-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/operator/config/crd/bases/charts.quay.io_directpvcharts.yaml b/operator/config/crd/bases/charts.quay.io_directpvcharts.yaml deleted file mode 100644 index eb3f8836..00000000 --- a/operator/config/crd/bases/charts.quay.io_directpvcharts.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: directpvcharts.charts.quay.io -spec: - group: charts.quay.io - names: - kind: DirectPVChart - listKind: DirectPVChartList - plural: directpvcharts - singular: directpvchart - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: DirectPVChart is the Schema for the directpvcharts API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec defines the desired state of DirectPVChart - type: object - x-kubernetes-preserve-unknown-fields: true - status: - description: Status defines the observed state of DirectPVChart - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - served: true - storage: true - subresources: - status: {} diff --git a/operator/config/crd/kustomization.yaml b/operator/config/crd/kustomization.yaml deleted file mode 100644 index 6913ae1e..00000000 --- a/operator/config/crd/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# This kustomization.yaml is not intended to be run by itself, -# since it depends on service name and namespace that are out of this kustomize package. -# It should be run by config/default -resources: -- bases/charts.quay.io_directpvcharts.yaml -#+kubebuilder:scaffold:crdkustomizeresource diff --git a/operator/config/default/kustomization.yaml b/operator/config/default/kustomization.yaml deleted file mode 100644 index 95b22e8d..00000000 --- a/operator/config/default/kustomization.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Adds namespace to all resources. -namespace: directpv-operator-system - -# Value of this field is prepended to the -# names of all resources, e.g. a deployment named -# "wordpress" becomes "alices-wordpress". -# Note that it should also match with the prefix (text before '-') of the namespace -# field above. -namePrefix: directpv-operator- - -# Labels to add to all resources and selectors. -#labels: -#- includeSelectors: true -# pairs: -# someName: someValue - -resources: -- ../crd -- ../rbac -- ../manager -# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. -#- ../prometheus - -patchesStrategicMerge: -# Protect the /metrics endpoint by putting it behind auth. -# If you want your controller-manager to expose the /metrics -# endpoint w/o any authn/z, please comment the following line. -- manager_auth_proxy_patch.yaml - - diff --git a/operator/config/default/manager_auth_proxy_patch.yaml b/operator/config/default/manager_auth_proxy_patch.yaml deleted file mode 100644 index 02f9efc0..00000000 --- a/operator/config/default/manager_auth_proxy_patch.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# This patch inject a sidecar container which is a HTTP proxy for the -# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux - containers: - - name: kube-rbac-proxy - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - "ALL" - image: gcr.io/kubebuilder/kube-rbac-proxy@sha256:d4883d7c622683b3319b5e6b3a7edfbf2594c18060131a8bf64504805f875522 - args: - - "--secure-listen-address=0.0.0.0:8443" - - "--upstream=http://127.0.0.1:8080/" - - "--logtostderr=true" - - "--v=0" - ports: - - containerPort: 8443 - protocol: TCP - name: https - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - name: manager - args: - - "--health-probe-bind-address=:8081" - - "--metrics-bind-address=127.0.0.1:8080" - - "--leader-elect" - - "--leader-election-id=directpv-operator" diff --git a/operator/config/default/manager_config_patch.yaml b/operator/config/default/manager_config_patch.yaml deleted file mode 100644 index f6f58916..00000000 --- a/operator/config/default/manager_config_patch.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: manager diff --git a/operator/config/manager/kustomization.yaml b/operator/config/manager/kustomization.yaml deleted file mode 100644 index e7d12de9..00000000 --- a/operator/config/manager/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -resources: -- manager.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: -- name: controller - newName: quay.io/minio/directpv-operator - newTag: 4.0.10 diff --git a/operator/config/manager/manager.yaml b/operator/config/manager/manager.yaml deleted file mode 100644 index 87e08fb9..00000000 --- a/operator/config/manager/manager.yaml +++ /dev/null @@ -1,101 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - control-plane: controller-manager - app.kubernetes.io/name: namespace - app.kubernetes.io/instance: system - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: system ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system - labels: - control-plane: controller-manager - app.kubernetes.io/name: deployment - app.kubernetes.io/instance: controller-manager - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: 1 - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: manager - labels: - control-plane: controller-manager - spec: - # TODO(user): Uncomment the following code to configure the nodeAffinity expression - # according to the platforms which are supported by your solution. - # It is considered best practice to support multiple architectures. You can - # build your manager image using the makefile target docker-buildx. - # affinity: - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchExpressions: - # - key: kubernetes.io/arch - # operator: In - # values: - # - amd64 - # - arm64 - # - ppc64le - # - s390x - # - key: kubernetes.io/os - # operator: In - # values: - # - linux - securityContext: - runAsNonRoot: true - # TODO(user): For common cases that do not require escalating privileges - # it is recommended to ensure that all your Pods/Containers are restrictive. - # More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted - # Please uncomment the following code if your project does NOT have to work on old Kubernetes - # versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ). - # seccompProfile: - # type: RuntimeDefault - containers: - - args: - - --leader-elect - - --leader-election-id=directpv-operator - image: controller:latest - name: manager - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - "ALL" - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - # TODO(user): Configure the resources accordingly based on the project requirements. - # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 10m - memory: 64Mi - serviceAccountName: controller-manager - terminationGracePeriodSeconds: 10 diff --git a/operator/config/manifests/bases/minio-directpv-operator.clusterserviceversion.yaml b/operator/config/manifests/bases/minio-directpv-operator.clusterserviceversion.yaml deleted file mode 100644 index 48c37aa4..00000000 --- a/operator/config/manifests/bases/minio-directpv-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: '[{"apiVersion": "charts.quay.io/v1alpha1","kind": "DirectPVChart","metadata": - {"name": "directpvchart-sample"},"spec":{"affinity": {},"autoscaling": {"enabled": - false,"maxReplicas": 100,"minReplicas": 1,"targetCPUUtilizationPercentage": - 80},"fullnameOverride": "","image": {"pullPolicy": "IfNotPresent","repository": - "nginx","tag": ""},"imagePullSecrets": [],"ingress": {"annotations": {},"className": - "","enabled": false,"hosts": [{"host": "chart-example.local","paths": [{"path": - "/","pathType": "ImplementationSpecific"}]}],"tls": []},"nameOverride": "","nodeSelector": - {},"podAnnotations": {},"podSecurityContext": {},"replicaCount": 1,"resources": - {},"securityContext": {},"service": {"port": 80,"type": "ClusterIP"},"serviceAccount": - {"annotations": {},"create": true,"name": ""},"tolerations": []}}]' - capabilities: Basic Install - name: minio-directpv-operator.v0.0.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: {} - description: Minio DirectPV Operator manages DirectPV deployments. - displayName: DirectPV - icon: - - base64data: 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 - mediatype: image/png - install: - spec: - deployments: null - strategy: "" - installModes: - - supported: false - type: OwnNamespace - - supported: false - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - DirectPV - links: - - name: Minio DirectPV Operator - url: https://min.io/directpv - maintainers: - - email: dev@minio.io - name: DirectPV - maturity: alpha - provider: - name: DirectPV - url: https://min.io/directpv - version: 0.0.0 diff --git a/operator/config/manifests/kustomization.yaml b/operator/config/manifests/kustomization.yaml deleted file mode 100644 index f5d0fd64..00000000 --- a/operator/config/manifests/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# These resources constitute the fully configured set of manifests -# used to generate the 'manifests/' directory in a bundle. -resources: -- bases/minio-directpv-operator.clusterserviceversion.yaml -- ../default -- ../samples -- ../scorecard diff --git a/operator/config/prometheus/kustomization.yaml b/operator/config/prometheus/kustomization.yaml deleted file mode 100644 index ed137168..00000000 --- a/operator/config/prometheus/kustomization.yaml +++ /dev/null @@ -1,2 +0,0 @@ -resources: -- monitor.yaml diff --git a/operator/config/prometheus/monitor.yaml b/operator/config/prometheus/monitor.yaml deleted file mode 100644 index 4d4cd970..00000000 --- a/operator/config/prometheus/monitor.yaml +++ /dev/null @@ -1,26 +0,0 @@ - -# Prometheus Monitor Service (Metrics) -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - control-plane: controller-manager - app.kubernetes.io/name: servicemonitor - app.kubernetes.io/instance: controller-manager-metrics-monitor - app.kubernetes.io/component: metrics - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: controller-manager-metrics-monitor - namespace: system -spec: - endpoints: - - path: /metrics - port: https - scheme: https - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - tlsConfig: - insecureSkipVerify: true - selector: - matchLabels: - control-plane: controller-manager diff --git a/operator/config/rbac/auth_proxy_client_clusterrole.yaml b/operator/config/rbac/auth_proxy_client_clusterrole.yaml deleted file mode 100644 index e11e6471..00000000 --- a/operator/config/rbac/auth_proxy_client_clusterrole.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: metrics-reader - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: metrics-reader -rules: -- nonResourceURLs: - - "/metrics" - verbs: - - get diff --git a/operator/config/rbac/auth_proxy_role.yaml b/operator/config/rbac/auth_proxy_role.yaml deleted file mode 100644 index 0565f624..00000000 --- a/operator/config/rbac/auth_proxy_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: proxy-role - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: proxy-role -rules: -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create diff --git a/operator/config/rbac/auth_proxy_role_binding.yaml b/operator/config/rbac/auth_proxy_role_binding.yaml deleted file mode 100644 index 28f14e6d..00000000 --- a/operator/config/rbac/auth_proxy_role_binding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: clusterrolebinding - app.kubernetes.io/instance: proxy-rolebinding - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: proxy-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/operator/config/rbac/auth_proxy_service.yaml b/operator/config/rbac/auth_proxy_service.yaml deleted file mode 100644 index 853ff0a0..00000000 --- a/operator/config/rbac/auth_proxy_service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - control-plane: controller-manager - app.kubernetes.io/name: service - app.kubernetes.io/instance: controller-manager-metrics-service - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: controller-manager-metrics-service - namespace: system -spec: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - selector: - control-plane: controller-manager diff --git a/operator/config/rbac/directpvchart_editor_role.yaml b/operator/config/rbac/directpvchart_editor_role.yaml deleted file mode 100644 index 23aaa023..00000000 --- a/operator/config/rbac/directpvchart_editor_role.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# permissions for end users to edit directpvcharts. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: directpvchart-editor-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: directpvchart-editor-role -rules: -- apiGroups: - - charts.quay.io - resources: - - directpvcharts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - charts.quay.io - resources: - - directpvcharts/status - verbs: - - get diff --git a/operator/config/rbac/directpvchart_viewer_role.yaml b/operator/config/rbac/directpvchart_viewer_role.yaml deleted file mode 100644 index 5a830033..00000000 --- a/operator/config/rbac/directpvchart_viewer_role.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# permissions for end users to view directpvcharts. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: directpvchart-viewer-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: directpvchart-viewer-role -rules: -- apiGroups: - - charts.quay.io - resources: - - directpvcharts - verbs: - - get - - list - - watch -- apiGroups: - - charts.quay.io - resources: - - directpvcharts/status - verbs: - - get diff --git a/operator/config/rbac/kustomization.yaml b/operator/config/rbac/kustomization.yaml deleted file mode 100644 index 731832a6..00000000 --- a/operator/config/rbac/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -resources: -# All RBAC will be applied under this service account in -# the deployment namespace. You may comment out this resource -# if your manager will use a service account that exists at -# runtime. Be sure to update RoleBinding and ClusterRoleBinding -# subjects if changing service account names. -- service_account.yaml -- role.yaml -- role_binding.yaml -- leader_election_role.yaml -- leader_election_role_binding.yaml -# Comment the following 4 lines if you want to disable -# the auth proxy (https://github.com/brancz/kube-rbac-proxy) -# which protects your /metrics endpoint. -- auth_proxy_service.yaml -- auth_proxy_role.yaml -- auth_proxy_role_binding.yaml -- auth_proxy_client_clusterrole.yaml diff --git a/operator/config/rbac/leader_election_role.yaml b/operator/config/rbac/leader_election_role.yaml deleted file mode 100644 index 93c20262..00000000 --- a/operator/config/rbac/leader_election_role.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# permissions to do leader election. -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app.kubernetes.io/name: role - app.kubernetes.io/instance: leader-election-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: leader-election-role -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch diff --git a/operator/config/rbac/leader_election_role_binding.yaml b/operator/config/rbac/leader_election_role_binding.yaml deleted file mode 100644 index e12db01c..00000000 --- a/operator/config/rbac/leader_election_role_binding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app.kubernetes.io/name: rolebinding - app.kubernetes.io/instance: leader-election-rolebinding - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: leader-election-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: leader-election-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/operator/config/rbac/role.yaml b/operator/config/rbac/role.yaml deleted file mode 100644 index 35adb78a..00000000 --- a/operator/config/rbac/role.yaml +++ /dev/null @@ -1,95 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: manager-role -rules: -## -## Base operator rules -## -# We need to get namespaces so the operator can read namespaces to ensure they exist -- apiGroups: - - "" - resources: - - namespaces - verbs: - - get -# We need to manage Helm release secrets -- apiGroups: - - "" - resources: - - secrets - verbs: - - "*" -# We need to create events on CRs about things happening during reconciliation -- apiGroups: - - "" - resources: - - events - verbs: - - create - -## -## Rules for charts.quay.io/v1alpha1, Kind: DirectPVChart -## -- apiGroups: - - charts.quay.io - resources: - - directpvcharts - - directpvcharts/status - - directpvcharts/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- verbs: - - "*" - apiGroups: - - "" - resources: - - "namespaces" -- verbs: - - "*" - apiGroups: - - "storage.k8s.io" - resources: - - "csidrivers" - - "storageclasses" -- verbs: - - "*" - apiGroups: - - "apiextensions.k8s.io" - resources: - - "customresourcedefinitions" -- verbs: - - "*" - apiGroups: - - "rbac.authorization.k8s.io" - resources: - - "clusterrolebindings" - - "clusterroles" -- verbs: - - "*" - apiGroups: - - "" - resources: - - "serviceaccounts" -- verbs: - - "*" - apiGroups: - - "rbac.authorization.k8s.io" - resources: - - "rolebindings" - - "roles" -- verbs: - - "*" - apiGroups: - - "apps" - resources: - - "daemonsets" - - "deployments" - -#+kubebuilder:scaffold:rules diff --git a/operator/config/rbac/role_binding.yaml b/operator/config/rbac/role_binding.yaml deleted file mode 100644 index 340ea93b..00000000 --- a/operator/config/rbac/role_binding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: clusterrolebinding - app.kubernetes.io/instance: manager-rolebinding - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: manager-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/operator/config/rbac/service_account.yaml b/operator/config/rbac/service_account.yaml deleted file mode 100644 index 2d488d76..00000000 --- a/operator/config/rbac/service_account.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/name: serviceaccount - app.kubernetes.io/instance: controller-manager-sa - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: directpv-operator - app.kubernetes.io/part-of: directpv-operator - app.kubernetes.io/managed-by: kustomize - name: controller-manager - namespace: system diff --git a/operator/config/samples/charts_v1alpha1_directpvchart.yaml b/operator/config/samples/charts_v1alpha1_directpvchart.yaml deleted file mode 100644 index 682f4f92..00000000 --- a/operator/config/samples/charts_v1alpha1_directpvchart.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: charts.quay.io/v1alpha1 -kind: DirectPVChart -metadata: - name: directpvchart-sample -spec: - # Default values copied from /helm-charts/directpv-chart/values.yaml - affinity: {} - autoscaling: - enabled: false - maxReplicas: 100 - minReplicas: 1 - targetCPUUtilizationPercentage: 80 - fullnameOverride: "" - image: - pullPolicy: IfNotPresent - repository: nginx - tag: "" - imagePullSecrets: [] - ingress: - annotations: {} - className: "" - enabled: false - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - nameOverride: "" - nodeSelector: {} - podAnnotations: {} - podSecurityContext: {} - replicaCount: 1 - resources: {} - securityContext: {} - service: - port: 80 - type: ClusterIP - serviceAccount: - annotations: {} - create: true - name: "" - tolerations: [] - - diff --git a/operator/config/samples/kustomization.yaml b/operator/config/samples/kustomization.yaml deleted file mode 100644 index 2b27b80b..00000000 --- a/operator/config/samples/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -## Append samples of your project ## -resources: -- charts_v1alpha1_directpvchart.yaml -#+kubebuilder:scaffold:manifestskustomizesamples diff --git a/operator/config/scorecard/bases/config.yaml b/operator/config/scorecard/bases/config.yaml deleted file mode 100644 index c7704784..00000000 --- a/operator/config/scorecard/bases/config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: [] diff --git a/operator/config/scorecard/kustomization.yaml b/operator/config/scorecard/kustomization.yaml deleted file mode 100644 index 50cd2d08..00000000 --- a/operator/config/scorecard/kustomization.yaml +++ /dev/null @@ -1,16 +0,0 @@ -resources: -- bases/config.yaml -patchesJson6902: -- path: patches/basic.config.yaml - target: - group: scorecard.operatorframework.io - version: v1alpha3 - kind: Configuration - name: config -- path: patches/olm.config.yaml - target: - group: scorecard.operatorframework.io - version: v1alpha3 - kind: Configuration - name: config -#+kubebuilder:scaffold:patchesJson6902 diff --git a/operator/config/scorecard/patches/basic.config.yaml b/operator/config/scorecard/patches/basic.config.yaml deleted file mode 100644 index 0d795820..00000000 --- a/operator/config/scorecard/patches/basic.config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: basic - test: basic-check-spec-test diff --git a/operator/config/scorecard/patches/olm.config.yaml b/operator/config/scorecard/patches/olm.config.yaml deleted file mode 100644 index 59be415b..00000000 --- a/operator/config/scorecard/patches/olm.config.yaml +++ /dev/null @@ -1,50 +0,0 @@ -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-bundle-validation-test -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-crds-have-validation-test -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-crds-have-resources-test -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-spec-descriptors-test -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.29.0 - labels: - suite: olm - test: olm-status-descriptors-test diff --git a/operator/examples/my-directpv.yaml b/operator/examples/my-directpv.yaml deleted file mode 100644 index 7834c2d4..00000000 --- a/operator/examples/my-directpv.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: charts.quay.io/v1alpha1 -kind: DirectPVChart -metadata: - name: directpvchart-sample -spec: - # Default values copied from /helm-charts/directpv-chart/values.yaml - affinity: {} - fullnameOverride: "" - image: - pullPolicy: IfNotPresent - imagePullSecrets: [] - nameOverride: "" - nodeSelector: {} - podAnnotations: {} - podSecurityContext: {} - replicaCount: 1 - resources: {} - securityContext: {} - serviceAccount: - annotations: {} - create: true - name: "" - tolerations: [] diff --git a/operator/helm-charts/.helmignore b/operator/helm-charts/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/operator/helm-charts/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/operator/helm-charts/directpv-chart/Chart.yaml b/operator/helm-charts/directpv-chart/Chart.yaml deleted file mode 100644 index 27784c75..00000000 --- a/operator/helm-charts/directpv-chart/Chart.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v2 -name: directpv-chart -description: A Helm chart for DirectPV -type: application -version: 0.1.0 -appVersion: "4.0.10" -maintainers: -- email: dev@min.io - name: MinIO - diff --git a/operator/helm-charts/directpv-chart/templates/CSIDriver.yaml b/operator/helm-charts/directpv-chart/templates/CSIDriver.yaml deleted file mode 100644 index c96c394d..00000000 --- a/operator/helm-charts/directpv-chart/templates/CSIDriver.yaml +++ /dev/null @@ -1,21 +0,0 @@ - -apiVersion: storage.k8s.io/v1 -kind: CSIDriver -metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 - creationTimestamp: null - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: directpv-min-io -spec: - attachRequired: false - podInfoOnMount: true - volumeLifecycleModes: - - Persistent - - Ephemeral - - diff --git a/operator/helm-charts/directpv-chart/templates/ClusterRole.yaml b/operator/helm-charts/directpv-chart/templates/ClusterRole.yaml deleted file mode 100644 index 49d4011d..00000000 --- a/operator/helm-charts/directpv-chart/templates/ClusterRole.yaml +++ /dev/null @@ -1,173 +0,0 @@ - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 - rbac.authorization.kubernetes.io/autoupdate: "true" - creationTimestamp: null - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: directpv-min-io -rules: -- apiGroups: - - "" - resources: - - persistentvolumes - verbs: - - create - - delete - - get - - list - - patch - - watch -- apiGroups: - - "" - resources: - - persistentvolumeclaims/status - verbs: - - patch -- apiGroups: - - policy - resources: - - podsecuritypolicies - verbs: - - use -- apiGroups: - - "" - resources: - - persistentvolumeclaims - verbs: - - get - - list - - update - - watch -- apiGroups: - - storage.k8s.io - resources: - - storageclasses - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - list - - patch - - update - - watch -- apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshots - verbs: - - get - - list -- apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshotcontents - verbs: - - get - - list -- apiGroups: - - storage.k8s.io - resources: - - csinodes - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - nodes - verbs: - - get - - list - - watch -- apiGroups: - - storage.k8s.io - resources: - - volumeattachments - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - endpoints - verbs: - - create - - delete - - get - - list - - update - - watch -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - delete - - get - - list - - update - - watch -- apiGroups: - - apiextensions.k8s.io - - directpv.min.io - resources: - - customresourcedefinitions - - customresourcedefinition - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - directpv.min.io - resources: - - directpvdrives - - directpvvolumes - - directpvnodes - - directpvinitrequests - verbs: - - create - - delete - - get - - list - - update - - watch -- apiGroups: - - "" - resources: - - pods - - pod - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - secrets - - secret - verbs: - - get - - list - - watch - - diff --git a/operator/helm-charts/directpv-chart/templates/ClusterRoleBinding.yaml b/operator/helm-charts/directpv-chart/templates/ClusterRoleBinding.yaml deleted file mode 100644 index db2c81ec..00000000 --- a/operator/helm-charts/directpv-chart/templates/ClusterRoleBinding.yaml +++ /dev/null @@ -1,24 +0,0 @@ - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 - rbac.authorization.kubernetes.io/autoupdate: "true" - creationTimestamp: null - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: directpv-min-io -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: directpv-min-io -subjects: -- kind: ServiceAccount - name: directpv-min-io - namespace: directpv - - diff --git a/operator/helm-charts/directpv-chart/templates/DaemonSet.yaml b/operator/helm-charts/directpv-chart/templates/DaemonSet.yaml deleted file mode 100644 index 2ab988df..00000000 --- a/operator/helm-charts/directpv-chart/templates/DaemonSet.yaml +++ /dev/null @@ -1,234 +0,0 @@ - -apiVersion: apps/v1 -kind: DaemonSet -metadata: - annotations: - directpv.min.io/image-tag: v4.0.10 - directpv.min.io/plugin-version: v4.0.10 - creationTimestamp: null - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: node-server - namespace: directpv -spec: - selector: - matchLabels: - selector.directpv.min.io: directpv-min-io-qlp2m - template: - metadata: - annotations: - created-by: kubectl-directpv - creationTimestamp: null - labels: - selector.directpv.min.io: directpv-min-io-qlp2m - selector.directpv.min.io.service: enabled - name: node-server - namespace: directpv - spec: - containers: - - args: - - --v=3 - - --csi-address=unix:///csi/csi.sock - - --kubelet-registration-path=/var/lib/kubelet/plugins/directpv-min-io/csi.sock - env: - - name: KUBE_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - image: quay.io/minio/csi-node-driver-registrar@sha256:c805fdc166761218dc9478e7ac8e0ad0e42ad442269e75608823da3eb761e67e - name: node-driver-registrar - resources: {} - terminationMessagePath: /var/log/driver-registrar-termination-log - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /csi - mountPropagation: None - name: socket-dir - - mountPath: /registration - mountPropagation: None - name: registration-dir - - args: - - node-server - - -v=3 - - --identity=directpv-min-io - - --csi-endpoint=$(CSI_ENDPOINT) - - --kube-node-name=$(KUBE_NODE_NAME) - - --readiness-port=30443 - - --metrics-port=10443 - env: - - name: KUBE_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - image: quay.io/minio/directpv:v4.0.10 - livenessProbe: - failureThreshold: 5 - httpGet: - path: /healthz - port: healthz - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 10 - name: node-server - ports: - - containerPort: 30443 - name: readinessport - protocol: TCP - - containerPort: 9898 - name: healthz - protocol: TCP - - containerPort: 10443 - name: metrics - protocol: TCP - readinessProbe: - failureThreshold: 5 - httpGet: - path: /ready - port: readinessport - scheme: HTTP - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 10 - resources: {} - securityContext: - privileged: true - terminationMessagePath: /var/log/driver-termination-log - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /csi - mountPropagation: None - name: socket-dir - - mountPath: /var/lib/kubelet/pods - mountPropagation: Bidirectional - name: mountpoint-dir - - mountPath: /var/lib/kubelet/plugins - mountPropagation: Bidirectional - name: plugins-dir - - mountPath: /var/lib/directpv/ - mountPropagation: Bidirectional - name: directpv-common-root - - mountPath: /sys - mountPropagation: Bidirectional - name: sysfs - - mountPath: /dev - mountPropagation: HostToContainer - name: devfs - readOnly: true - - mountPath: /run/udev/data - mountPropagation: Bidirectional - name: run-udev-data-dir - readOnly: true - - mountPath: /var/lib/direct-csi/ - mountPropagation: Bidirectional - name: direct-csi-common-root - - args: - - node-controller - - -v=3 - - --kube-node-name=$(KUBE_NODE_NAME) - env: - - name: KUBE_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - image: quay.io/minio/directpv:v4.0.10 - name: node-controller - resources: {} - securityContext: - privileged: true - terminationMessagePath: /var/log/driver-termination-log - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /csi - mountPropagation: None - name: socket-dir - - mountPath: /var/lib/kubelet/pods - mountPropagation: Bidirectional - name: mountpoint-dir - - mountPath: /var/lib/kubelet/plugins - mountPropagation: Bidirectional - name: plugins-dir - - mountPath: /var/lib/directpv/ - mountPropagation: Bidirectional - name: directpv-common-root - - mountPath: /sys - mountPropagation: Bidirectional - name: sysfs - - mountPath: /dev - mountPropagation: HostToContainer - name: devfs - readOnly: true - - mountPath: /run/udev/data - mountPropagation: Bidirectional - name: run-udev-data-dir - readOnly: true - - mountPath: /var/lib/direct-csi/ - mountPropagation: Bidirectional - name: direct-csi-common-root - - args: - - --csi-address=/csi/csi.sock - - --health-port=9898 - image: quay.io/minio/livenessprobe@sha256:f3bc9a84f149cd7362e4bd0ae8cd90b26ad020c2591bfe19e63ff97aacf806c3 - name: liveness-probe - resources: {} - terminationMessagePath: /var/log/driver-liveness-termination-log - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /csi - mountPropagation: None - name: socket-dir - hostPID: true - serviceAccountName: directpv-min-io - volumes: - - hostPath: - path: /var/lib/kubelet/plugins/directpv-min-io - type: DirectoryOrCreate - name: socket-dir - - hostPath: - path: /var/lib/kubelet/pods - type: DirectoryOrCreate - name: mountpoint-dir - - hostPath: - path: /var/lib/kubelet/plugins_registry - type: DirectoryOrCreate - name: registration-dir - - hostPath: - path: /var/lib/kubelet/plugins - type: DirectoryOrCreate - name: plugins-dir - - hostPath: - path: /var/lib/directpv/ - type: DirectoryOrCreate - name: directpv-common-root - - hostPath: - path: /sys - type: DirectoryOrCreate - name: sysfs - - hostPath: - path: /dev - type: DirectoryOrCreate - name: devfs - - hostPath: - path: /run/udev/data - type: DirectoryOrCreate - name: run-udev-data-dir - - hostPath: - path: /var/lib/direct-csi/ - type: DirectoryOrCreate - name: direct-csi-common-root - updateStrategy: - type: RollingUpdate -status: - currentNumberScheduled: 0 - desiredNumberScheduled: 0 - numberMisscheduled: 0 - numberReady: 0 - - diff --git a/operator/helm-charts/directpv-chart/templates/Deployment.yaml b/operator/helm-charts/directpv-chart/templates/Deployment.yaml deleted file mode 100644 index 27bd9a02..00000000 --- a/operator/helm-charts/directpv-chart/templates/Deployment.yaml +++ /dev/null @@ -1,122 +0,0 @@ - -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - directpv.min.io/image-tag: v4.0.10 - directpv.min.io/plugin-version: v4.0.10 - creationTimestamp: null - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: controller - namespace: directpv -spec: - replicas: 3 - selector: - matchLabels: - selector.directpv.min.io: controller-jwalg - strategy: - type: Recreate - template: - metadata: - annotations: - created-by: kubectl-directpv - creationTimestamp: null - labels: - selector.directpv.min.io: controller-jwalg - name: controller - namespace: directpv - spec: - containers: - - args: - - --v=3 - - --timeout=300s - - --csi-address=$(CSI_ENDPOINT) - - --leader-election - - --feature-gates=Topology=true - - --strict-topology - env: - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - image: quay.io/minio/csi-provisioner@sha256:7b5c070ec70d30b0895d91b10c39a0e6cc81c18e0d1566c77aeff2a3587fa316 - name: csi-provisioner - resources: {} - securityContext: - privileged: true - terminationMessagePath: /var/log/controller-provisioner-termination-log - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /csi - mountPropagation: None - name: socket-dir - - args: - - --v=3 - - --timeout=300s - - --csi-address=$(CSI_ENDPOINT) - - --leader-election - env: - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - image: quay.io/minio/csi-resizer@sha256:819f68a4daf75acec336302843f303cf360d4941249f9f5019ffbb690c8ac7c0 - name: csi-resizer - resources: {} - securityContext: - privileged: true - terminationMessagePath: /var/log/controller-csi-resizer-termination-log - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /csi - mountPropagation: None - name: socket-dir - - args: - - controller - - --identity=directpv-min-io - - -v=3 - - --csi-endpoint=$(CSI_ENDPOINT) - - --kube-node-name=$(KUBE_NODE_NAME) - - --readiness-port=30443 - env: - - name: KUBE_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - image: quay.io/minio/directpv:v4.0.10 - name: controller - ports: - - containerPort: 30443 - name: readinessport - protocol: TCP - - containerPort: 9898 - name: healthz - protocol: TCP - readinessProbe: - failureThreshold: 5 - httpGet: - path: /ready - port: readinessport - scheme: HTTP - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 10 - resources: {} - securityContext: - privileged: true - volumeMounts: - - mountPath: /csi - mountPropagation: None - name: socket-dir - serviceAccountName: directpv-min-io - volumes: - - hostPath: - path: /var/lib/kubelet/plugins/controller-controller - type: DirectoryOrCreate - name: socket-dir -status: {} - - diff --git a/operator/helm-charts/directpv-chart/templates/Namespace.yaml b/operator/helm-charts/directpv-chart/templates/Namespace.yaml deleted file mode 100644 index ddbe0581..00000000 --- a/operator/helm-charts/directpv-chart/templates/Namespace.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 - creationTimestamp: null - finalizers: - - foregroundDeletion - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - pod-security.kubernetes.io/enforce: privileged - name: directpv -spec: {} -status: {} - - diff --git a/operator/helm-charts/directpv-chart/templates/Role.yaml b/operator/helm-charts/directpv-chart/templates/Role.yaml deleted file mode 100644 index 6c24f897..00000000 --- a/operator/helm-charts/directpv-chart/templates/Role.yaml +++ /dev/null @@ -1,29 +0,0 @@ - -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 - rbac.authorization.kubernetes.io/autoupdate: "true" - creationTimestamp: null - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: directpv-min-io - namespace: directpv -rules: -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - delete - - get - - list - - update - - watch - - diff --git a/operator/helm-charts/directpv-chart/templates/RoleBinding.yaml b/operator/helm-charts/directpv-chart/templates/RoleBinding.yaml deleted file mode 100644 index 50a12e97..00000000 --- a/operator/helm-charts/directpv-chart/templates/RoleBinding.yaml +++ /dev/null @@ -1,25 +0,0 @@ - -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 - rbac.authorization.kubernetes.io/autoupdate: "true" - creationTimestamp: null - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: directpv-min-io - namespace: directpv -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: directpv-min-io -subjects: -- kind: ServiceAccount - name: directpv-min-io - namespace: directpv - - diff --git a/operator/helm-charts/directpv-chart/templates/ServiceAccount.yaml b/operator/helm-charts/directpv-chart/templates/ServiceAccount.yaml deleted file mode 100644 index a4687439..00000000 --- a/operator/helm-charts/directpv-chart/templates/ServiceAccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ - -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 - creationTimestamp: null - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: directpv-min-io - namespace: directpv - - diff --git a/operator/helm-charts/directpv-chart/templates/StorageClass.yaml b/operator/helm-charts/directpv-chart/templates/StorageClass.yaml deleted file mode 100644 index 300c8aa4..00000000 --- a/operator/helm-charts/directpv-chart/templates/StorageClass.yaml +++ /dev/null @@ -1,28 +0,0 @@ - -allowVolumeExpansion: true -allowedTopologies: -- matchLabelExpressions: - - key: directpv.min.io/identity - values: - - directpv-min-io -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 - creationTimestamp: null - finalizers: - - foregroundDeletion - labels: - application-name: directpv.min.io - application-type: CSIDriver - directpv.min.io/created-by: kubectl-directpv - directpv.min.io/version: v1beta1 - name: directpv-min-io -parameters: - csi.storage.k8s.io/fstype: xfs -provisioner: directpv-min-io -reclaimPolicy: Delete -volumeBindingMode: WaitForFirstConsumer - - diff --git a/operator/helm-charts/directpv-chart/templates/directpvdrives.directpv.min.io.yaml b/operator/helm-charts/directpv-chart/templates/directpvdrives.directpv.min.io.yaml deleted file mode 100644 index e22b2f64..00000000 --- a/operator/helm-charts/directpv-chart/templates/directpvdrives.directpv.min.io.yaml +++ /dev/null @@ -1,162 +0,0 @@ - -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - creationTimestamp: null - labels: - directpv.min.io/version: v1beta1 - name: directpvdrives.directpv.min.io -spec: - conversion: - strategy: None - group: directpv.min.io - names: - kind: DirectPVDrive - listKind: DirectPVDriveList - plural: directpvdrives - singular: directpvdrive - scope: Cluster - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: DirectPVDrive denotes drive CRD object. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: DriveSpec represents DirectPV drive specification values. - properties: - relabel: - type: boolean - unschedulable: - type: boolean - type: object - status: - description: DriveStatus denotes drive information. - properties: - allocatedCapacity: - format: int64 - type: integer - conditions: - items: - description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - freeCapacity: - format: int64 - type: integer - fsuuid: - type: string - make: - type: string - status: - description: DriveStatus denotes drive status - type: string - topology: - additionalProperties: - type: string - type: object - totalCapacity: - format: int64 - type: integer - required: - - allocatedCapacity - - freeCapacity - - fsuuid - - status - - topology - - totalCapacity - type: object - required: - - metadata - - status - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null - - diff --git a/operator/helm-charts/directpv-chart/templates/directpvinitrequests.directpv.min.io.yaml b/operator/helm-charts/directpv-chart/templates/directpvinitrequests.directpv.min.io.yaml deleted file mode 100644 index eed7dff1..00000000 --- a/operator/helm-charts/directpv-chart/templates/directpvinitrequests.directpv.min.io.yaml +++ /dev/null @@ -1,99 +0,0 @@ - -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - creationTimestamp: null - labels: - directpv.min.io/version: v1beta1 - name: directpvinitrequests.directpv.min.io -spec: - conversion: - strategy: None - group: directpv.min.io - names: - kind: DirectPVInitRequest - listKind: DirectPVInitRequestList - plural: directpvinitrequests - singular: directpvinitrequest - scope: Cluster - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: DirectPVInitRequest denotes DirectPVInitRequest CRD object. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: InitRequestSpec represents the spec for InitRequest. - properties: - devices: - items: - description: InitDevice represents the device requested for initialization. - properties: - force: - type: boolean - id: - type: string - name: - type: string - required: - - force - - id - - name - type: object - type: array - x-kubernetes-list-type: atomic - required: - - devices - type: object - status: - description: InitRequestStatus represents the status of the InitRequest. - properties: - results: - items: - description: InitDeviceResult represents the result of the InitDeviceRequest. - properties: - error: - type: string - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - status: - description: InitStatus denotes initialization status - type: string - required: - - results - - status - type: object - required: - - metadata - - spec - - status - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null - - diff --git a/operator/helm-charts/directpv-chart/templates/directpvnodes.directpv.min.io.yaml b/operator/helm-charts/directpv-chart/templates/directpvnodes.directpv.min.io.yaml deleted file mode 100644 index 93014b1c..00000000 --- a/operator/helm-charts/directpv-chart/templates/directpvnodes.directpv.min.io.yaml +++ /dev/null @@ -1,164 +0,0 @@ - -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - creationTimestamp: null - labels: - directpv.min.io/version: v1beta1 - name: directpvnodes.directpv.min.io -spec: - conversion: - strategy: None - group: directpv.min.io - names: - kind: DirectPVNode - listKind: DirectPVNodeList - plural: directpvnodes - singular: directpvnode - scope: Cluster - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: DirectPVNode denotes Node CRD object. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: NodeSpec represents DirectPV node specification values. - properties: - refresh: - type: boolean - type: object - status: - description: NodeStatus denotes node information. - properties: - conditions: - items: - description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - devices: - items: - description: Device denotes the device information in a drive - properties: - deniedReason: - type: string - fsType: - type: string - fsuuid: - type: string - id: - type: string - majorMinor: - type: string - make: - type: string - name: - type: string - size: - format: int64 - type: integer - required: - - id - - majorMinor - - name - - size - type: object - type: array - x-kubernetes-list-type: atomic - required: - - devices - type: object - required: - - metadata - - status - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null - - diff --git a/operator/helm-charts/directpv-chart/templates/directpvvolumes.directpv.min.io.yaml b/operator/helm-charts/directpv-chart/templates/directpvvolumes.directpv.min.io.yaml deleted file mode 100644 index 83a9a47e..00000000 --- a/operator/helm-charts/directpv-chart/templates/directpvvolumes.directpv.min.io.yaml +++ /dev/null @@ -1,156 +0,0 @@ - -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - creationTimestamp: null - labels: - directpv.min.io/version: v1beta1 - name: directpvvolumes.directpv.min.io -spec: - conversion: - strategy: None - group: directpv.min.io - names: - kind: DirectPVVolume - listKind: DirectPVVolumeList - plural: directpvvolumes - singular: directpvvolume - scope: Cluster - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: DirectPVVolume denotes volume CRD object. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - status: - description: VolumeStatus denotes volume information. - properties: - availableCapacity: - format: int64 - type: integer - conditions: - items: - description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - dataPath: - type: string - fsuuid: - type: string - stagingTargetPath: - type: string - status: - description: VolumeStatus represents status of a volume. - type: string - targetPath: - type: string - totalCapacity: - format: int64 - type: integer - usedCapacity: - format: int64 - type: integer - required: - - availableCapacity - - dataPath - - fsuuid - - stagingTargetPath - - status - - targetPath - - totalCapacity - - usedCapacity - type: object - required: - - metadata - - status - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null - - diff --git a/operator/helm-charts/directpv-chart/values.yaml b/operator/helm-charts/directpv-chart/values.yaml deleted file mode 100644 index 02bbb6dd..00000000 --- a/operator/helm-charts/directpv-chart/values.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# Default values for directpv-chart. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: nginx - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/operator/watches.yaml b/operator/watches.yaml deleted file mode 100644 index 0088bbeb..00000000 --- a/operator/watches.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Use the 'create api' subcommand to add watches to this file. -- group: charts.quay.io - version: v1alpha1 - kind: DirectPVChart - chart: helm-charts/directpv-chart -#+kubebuilder:scaffold:watch diff --git a/release-operator.sh b/release-operator.sh deleted file mode 100755 index 23b8eebc..00000000 --- a/release-operator.sh +++ /dev/null @@ -1,178 +0,0 @@ -#!/bin/bash -# This file is part of MinIO DirectPV -# Copyright (c) 2023 MinIO, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -ME=$(basename "$0"); export ME -cd "$(dirname "$0")" || exit 255 - -set -o errexit -set -o nounset -set -o pipefail - -declare BUILD_VERSION KUBECTL_DIRECTPV PODMAN OPERATOR_SDK KUSTOMIZE - -function init() { - if [ "$#" -ne 1 ]; then - cat < - -EXAMPLE: - $ ${ME} 4.0.8 -EOF - exit 255 - fi - - # assign after trimming 'v' - BUILD_VERSION="${1/v/}" - - kubectl_directpv="kubectl-directpv_${BUILD_VERSION}_$(go env GOOS)_$(go env GOARCH)" - KUBECTL_DIRECTPV="${PWD}/${kubectl_directpv}" - if [ ! -f "${KUBECTL_DIRECTPV}" ]; then - echo "Downloading ${kubectl_directpv}" - curl --silent --location --insecure --fail --output "${kubectl_directpv}" "https://github.com/minio/directpv/releases/download/v${BUILD_VERSION}/${kubectl_directpv}" - chmod a+x "${kubectl_directpv}" - fi - - if which podman >/dev/null 2>&1; then - PODMAN=podman - elif which docker >/dev/null 2>&1; then - PODMAN=docker - else - echo "no podman or docker found; please install" - exit 255 - fi - - if which operator-sdk >/dev/null 2>&1; then - OPERATOR_SDK=operator-sdk - fi - if [ -f "operator-sdk" ]; then - OPERATOR_SDK="${PWD}/operator-sdk" - fi - if [ -z "${OPERATOR_SDK=}" ]; then - OPERATOR_SDK="${PWD}/operator-sdk" - echo "Downloading operator-sdk" - release=$(curl -sfL "https://api.github.com/repos/operator-framework/operator-sdk/releases/latest" | awk '/tag_name/ { print substr($2, 2, length($2)-3) }') - curl -sfLo operator-sdk "https://github.com/operator-framework/operator-sdk/releases/download/${release}/operator-sdk_$(go env GOOS)_$(go env GOARCH)" - chmod a+x operator-sdk - fi - - if which kustomize >/dev/null 2>&1; then - KUSTOMIZE=kustomize - fi - if [ -f ./kustomize ]; then - KUSTOMIZE="${PWD}/kustomize" - fi - if [ -z "${KUSTOMIZE=}" ]; then - KUSTOMIZE="${PWD}/kustomize" - echo "Downloading kustomize" - release=$(curl -sfL "https://api.github.com/repos/kubernetes-sigs/kustomize/releases/latest" | awk '/tag_name/ { print substr($2, 12, length($2)-13) }') - curl --silent --location --insecure --fail "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${release}/kustomize_${release}_$(go env GOOS)_$(go env GOARCH).tar.gz" | tar -zxf - - fi -} - -function git_commit() { - case "$(git describe --always --dirty)" in - *dirty) - git commit --quiet --all -m "$*" - git push --quiet - ;; - esac -} - -function update_charts() { - sed -i -e "/^appVersion: /c appVersion: \"${BUILD_VERSION}\"" "${PWD}/operator/helm-charts/directpv-chart/Chart.yaml" - "${KUBECTL_DIRECTPV}" install -o yaml | sed -e 's/^---/~~~/g' | awk '{f="file" NR; print $0 > f}' RS='~~~' - for file in file*; do - name=$(awk '/^kind:/ { print $NF }' "${file}") - if [ "${name}" == "CustomResourceDefinition" ]; then - name=$(awk '/^ name:/ { print $NF }' "${file}") - fi - if [ -n "${name}" ]; then - mv "${file}" "${PWD}/operator/helm-charts/directpv-chart/templates/${name}.yaml" - else - rm "${file}" - fi - done - - git_commit "Update Helm charts for v${BUILD_VERSION}" -} - -function make_release() { - export IMAGE_TAG_BASE=quay.io/minio/directpv-operator - export IMG="${IMAGE_TAG_BASE}:${BUILD_VERSION}" - - cd operator - - "${PODMAN}" buildx build --platform linux/amd64 --tag "${IMG}" . - "${PODMAN}" push "${IMG}" - git_commit "Update operator for v${BUILD_VERSION}" - - # Package is intended for certified operators only not for rhmp anymore. - "${OPERATOR_SDK}" generate kustomize manifests --quiet --package minio-directpv-operator -} - -### subsequent_steps() objective: -# -# To add additional things once images has been pushed in make_release() -# -### Reasoning: -# -# We can't add these additional things until images are pushed. -# This is why we need this function, similar to what we are doing at -# Operator repo: https://github.com/minio/operator/blob/master/olm-post-script.sh -# -function subsequent_steps() { - export IMAGE_TAG_BASE=quay.io/minio/directpv-operator - # Package is intended for certified operators only not for rhmp anymore. - # --use-image-digests flag will create relatedImages section by digest - # there is no need for any further modification if using --use-image-digests flag to get the digest form. - export BUNDLE_GEN_FLAGS="-q --overwrite --version ${BUILD_VERSION} --package minio-directpv-operator --use-image-digests" - export BUNDLE_IMG="${IMAGE_TAG_BASE}-bundle:v${BUILD_VERSION}" - export CONTROLLER_IMAGE="${IMAGE_TAG_BASE}:${BUILD_VERSION}" - - # Controller image, should be in SHA Digest form for certification to pass test: - # verify-pinned-digest where all your container images should use SHA digests instead of tags. - # Example: - # (cd config/manager && kustomize edit set image controller=quay.io/minio/directpv-operator@sha256:04fec2fbd0d17f449a17c0f509b359c18d6c662e0a22e84cd625b538ca2a1af2) - (cd config/manager && "${KUSTOMIZE}" edit set image controller="${CONTROLLER_IMAGE}") - # shellcheck disable=SC2086 - "${KUSTOMIZE}" build config/manifests | "${OPERATOR_SDK}" generate bundle ${BUNDLE_GEN_FLAGS} - # Since above line overwrites our redhat annotation, - # it will be added back: - { - echo " # Annotations to specify OCP versions compatibility." - echo " com.redhat.openshift.versions: v4.8-v4.13" - } >> bundle/metadata/annotations.yaml - "${OPERATOR_SDK}" bundle validate ./bundle - git_commit "Update operator bundle for v${BUILD_VERSION}" - - "${PODMAN}" build -f bundle.Dockerfile --tag "${BUNDLE_IMG}" . - "${PODMAN}" push "${BUNDLE_IMG}" - git_commit "Update operator bundle image for v${BUILD_VERSION}" - - cd - - -} - -function main() { - update_charts - make_release - subsequent_steps -} - -init "$@" -main "$@"