diff --git a/.github/workflows/functests.yml b/.github/workflows/functests.yml index 8ec097078..5f09c1c12 100644 --- a/.github/workflows/functests.yml +++ b/.github/workflows/functests.yml @@ -69,6 +69,11 @@ jobs: while kubectl get pods -n kube-system --no-headers | grep -vqw Running; do echo "Waiting for Minikube pods to be ready"; sleep 3; done while kubectl get nodes --no-headers | grep -vqw Ready; do echo "Waiting for Minikube node to be ready"; sleep 3; done + - name: Enable kustomize + if: contains(fromJson('["v1.24.17", "v1.25.16", "v1.26.15", "v1.27.15", "v1.28.11", "v1.29.6", "v1.30.2"]'), matrix.kube-version) + run: | + echo "KUSTOMIZE=true" >> $GITHUB_ENV + - name: Run tests run: | functests/run-tests.sh diff --git a/functests/common.sh b/functests/common.sh index 8d8f8ada9..166c4431a 100644 --- a/functests/common.sh +++ b/functests/common.sh @@ -137,6 +137,41 @@ function install_directpv() { sleep 10 } +# install_directpv_kustomize +function install_directpv_kustomize() { + directpv_client="$1" + echo "* Installing DirectPV via kustomize" + + cat > kustomization.yaml < function uninstall_directpv() { directpv_client="$1" @@ -160,6 +195,39 @@ function uninstall_directpv() { return 0 } +# uninstall_directpv_kustomize +function uninstall_directpv_kustomize() { + echo "* Uninstalling DirectPV via kustomize" + + cat > kustomization.yaml </dev/null | wc -l) + done + + while kubectl get namespace directpv-min-io --no-headers 2>/dev/null | grep -q .; do + echo " ...waiting for directpv-min-io namespace to be removed" + sleep 5 + done + + return 0 +} + # usage: check_drives_status function check_drives_status() { if ! is_github_workflow; then diff --git a/functests/tests.sh b/functests/tests.sh index a979098db..aa60756d4 100644 --- a/functests/tests.sh +++ b/functests/tests.sh @@ -25,7 +25,11 @@ function run_tests() { setup_lvm setup_luks pod_count=$(( 3 + ACTIVE_NODES )) - install_directpv "${DIRECTPV_DIR}/kubectl-directpv" "${pod_count}" + if [ "${KUSTOMIZE}" == "true" ]; then + install_directpv_kustomize "${DIRECTPV_DIR}/kubectl-directpv" "${pod_count}" + else + install_directpv "${DIRECTPV_DIR}/kubectl-directpv" "${pod_count}" + fi add_drives "${DIRECTPV_DIR}/kubectl-directpv" deploy_minio minio.yaml test_force_delete @@ -34,7 +38,11 @@ function run_tests() { uninstall_minio "${DIRECTPV_DIR}/kubectl-directpv" minio.yaml test_volume_expansion "${DIRECTPV_DIR}/kubectl-directpv" sleep.yaml remove_drives "${DIRECTPV_DIR}/kubectl-directpv" - uninstall_directpv "${DIRECTPV_DIR}/kubectl-directpv" "${pod_count}" + if [ "${KUSTOMIZE}" == "true" ]; then + uninstall_directpv_kustomize "${pod_count}" + else + uninstall_directpv "${DIRECTPV_DIR}/kubectl-directpv" "${pod_count}" + fi unmount_directpv remove_luks remove_lvm diff --git a/operator/helm-charts/directpv-chart/templates/CSIDriver.yaml b/operator/helm-charts/directpv-chart/templates/CSIDriver.yaml index c96c394d9..bae60543c 100644 --- a/operator/helm-charts/directpv-chart/templates/CSIDriver.yaml +++ b/operator/helm-charts/directpv-chart/templates/CSIDriver.yaml @@ -3,7 +3,6 @@ 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 diff --git a/operator/helm-charts/directpv-chart/templates/ClusterRole.yaml b/operator/helm-charts/directpv-chart/templates/ClusterRole.yaml index 49d4011dc..c5b5884fd 100644 --- a/operator/helm-charts/directpv-chart/templates/ClusterRole.yaml +++ b/operator/helm-charts/directpv-chart/templates/ClusterRole.yaml @@ -3,7 +3,6 @@ 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: @@ -63,20 +62,6 @@ rules: - 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: @@ -125,10 +110,8 @@ rules: - watch - apiGroups: - apiextensions.k8s.io - - directpv.min.io resources: - customresourcedefinitions - - customresourcedefinition verbs: - create - delete @@ -155,7 +138,6 @@ rules: - "" resources: - pods - - pod verbs: - get - list @@ -164,10 +146,7 @@ rules: - "" 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 index db2c81ec5..448cb6921 100644 --- a/operator/helm-charts/directpv-chart/templates/ClusterRoleBinding.yaml +++ b/operator/helm-charts/directpv-chart/templates/ClusterRoleBinding.yaml @@ -3,7 +3,6 @@ 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: diff --git a/operator/helm-charts/directpv-chart/templates/DaemonSet.yaml b/operator/helm-charts/directpv-chart/templates/DaemonSet.yaml index 2ab988df0..0dca4aaaa 100644 --- a/operator/helm-charts/directpv-chart/templates/DaemonSet.yaml +++ b/operator/helm-charts/directpv-chart/templates/DaemonSet.yaml @@ -2,9 +2,6 @@ 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 diff --git a/operator/helm-charts/directpv-chart/templates/Deployment.yaml b/operator/helm-charts/directpv-chart/templates/Deployment.yaml index 27bd9a023..8551c57a8 100644 --- a/operator/helm-charts/directpv-chart/templates/Deployment.yaml +++ b/operator/helm-charts/directpv-chart/templates/Deployment.yaml @@ -2,9 +2,6 @@ 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 diff --git a/operator/helm-charts/directpv-chart/templates/Namespace.yaml b/operator/helm-charts/directpv-chart/templates/Namespace.yaml index ddbe05813..32bcf0d65 100644 --- a/operator/helm-charts/directpv-chart/templates/Namespace.yaml +++ b/operator/helm-charts/directpv-chart/templates/Namespace.yaml @@ -1,8 +1,6 @@ apiVersion: v1 kind: Namespace metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 creationTimestamp: null finalizers: - foregroundDeletion diff --git a/operator/helm-charts/directpv-chart/templates/Role.yaml b/operator/helm-charts/directpv-chart/templates/Role.yaml index 6c24f897c..9fb48aa12 100644 --- a/operator/helm-charts/directpv-chart/templates/Role.yaml +++ b/operator/helm-charts/directpv-chart/templates/Role.yaml @@ -3,7 +3,6 @@ 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: diff --git a/operator/helm-charts/directpv-chart/templates/RoleBinding.yaml b/operator/helm-charts/directpv-chart/templates/RoleBinding.yaml index 50a12e975..c79239fe9 100644 --- a/operator/helm-charts/directpv-chart/templates/RoleBinding.yaml +++ b/operator/helm-charts/directpv-chart/templates/RoleBinding.yaml @@ -3,7 +3,6 @@ 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: diff --git a/operator/helm-charts/directpv-chart/templates/ServiceAccount.yaml b/operator/helm-charts/directpv-chart/templates/ServiceAccount.yaml index a46874395..449915122 100644 --- a/operator/helm-charts/directpv-chart/templates/ServiceAccount.yaml +++ b/operator/helm-charts/directpv-chart/templates/ServiceAccount.yaml @@ -3,7 +3,6 @@ apiVersion: v1 kind: ServiceAccount metadata: annotations: - directpv.min.io/plugin-version: v4.0.10 creationTimestamp: null labels: application-name: directpv.min.io diff --git a/operator/helm-charts/directpv-chart/templates/StorageClass.yaml b/operator/helm-charts/directpv-chart/templates/StorageClass.yaml index 300c8aa42..97ecc0e88 100644 --- a/operator/helm-charts/directpv-chart/templates/StorageClass.yaml +++ b/operator/helm-charts/directpv-chart/templates/StorageClass.yaml @@ -8,8 +8,6 @@ allowedTopologies: apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: - annotations: - directpv.min.io/plugin-version: v4.0.10 creationTimestamp: null finalizers: - foregroundDeletion diff --git a/pkg/admin/installer/args.go b/pkg/admin/installer/args.go index 91f680744..635e94186 100644 --- a/pkg/admin/installer/args.go +++ b/pkg/admin/installer/args.go @@ -21,7 +21,6 @@ import ( "fmt" "io" "path" - "regexp" "github.com/minio/directpv/pkg/utils" corev1 "k8s.io/api/core/v1" @@ -80,18 +79,10 @@ type Args struct { nodeDriverRegistrarImage string livenessProbeImage string csiResizerImage string - imageTag string } -var imageTagRegex = regexp.MustCompile(`:([^/]+)$`) - // NewArgs creates arguments for DirectPV installation. func NewArgs(image string) *Args { - imageTag := "dev" - matchIndex := imageTagRegex.FindStringSubmatchIndex(image) - if len(matchIndex) > 0 && len(image) > matchIndex[0]+1 { - imageTag = image[matchIndex[0]+1:] - } return &Args{ image: image, Registry: "quay.io", @@ -101,7 +92,6 @@ func NewArgs(image string) *Args { nodeDriverRegistrarImage: nodeDriverRegistrarImage, livenessProbeImage: livenessProbeImage, csiResizerImage: csiResizerImage, - imageTag: imageTag, } } diff --git a/pkg/admin/installer/csidriver.go b/pkg/admin/installer/csidriver.go index 7cce21acd..0437dae45 100644 --- a/pkg/admin/installer/csidriver.go +++ b/pkg/admin/installer/csidriver.go @@ -21,7 +21,6 @@ import ( "errors" "fmt" - directpvtypes "github.com/minio/directpv/pkg/apis/directpv.min.io/types" "github.com/minio/directpv/pkg/client" "github.com/minio/directpv/pkg/consts" legacyclient "github.com/minio/directpv/pkg/legacy/client" @@ -95,10 +94,7 @@ func (t csiDriverTask) doCreateCSIDriver(ctx context.Context, args *Args, versio ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: metav1.NamespaceNone, - Annotations: map[string]string{ - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, - }, - Labels: defaultLabels, + Labels: defaultLabels, }, Spec: storagev1.CSIDriverSpec{ PodInfoOnMount: &podInfoOnMount, @@ -128,10 +124,7 @@ func (t csiDriverTask) doCreateCSIDriver(ctx context.Context, args *Args, versio ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: metav1.NamespaceNone, - Annotations: map[string]string{ - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, - }, - Labels: defaultLabels, + Labels: defaultLabels, }, Spec: storagev1beta1.CSIDriverSpec{ PodInfoOnMount: &podInfoOnMount, diff --git a/pkg/admin/installer/daemonset.go b/pkg/admin/installer/daemonset.go index 627b11225..791cf6997 100644 --- a/pkg/admin/installer/daemonset.go +++ b/pkg/admin/installer/daemonset.go @@ -20,7 +20,6 @@ import ( "context" "fmt" - directpvtypes "github.com/minio/directpv/pkg/apis/directpv.min.io/types" "github.com/minio/directpv/pkg/client" "github.com/minio/directpv/pkg/consts" "github.com/minio/directpv/pkg/k8s" @@ -215,11 +214,7 @@ func newDaemonset(podSpec corev1.PodSpec, name, selectorValue string, args *Args ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, - Annotations: map[string]string{ - string(directpvtypes.ImageTagLabelKey): args.imageTag, - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, - }, - Labels: defaultLabels, + Labels: defaultLabels, }, Spec: appsv1.DaemonSetSpec{ Selector: metav1.AddLabelToSelector(&metav1.LabelSelector{}, selectorKey, selectorValue), @@ -297,7 +292,7 @@ func (t daemonsetTask) doCreateDaemonset(ctx context.Context, args *Args) (err e } } if selectorValue == "" { - selectorValue = fmt.Sprintf("%v-%v", consts.Identity, getRandSuffix()) + selectorValue = fmt.Sprintf("%v-%v", consts.Identity, consts.NodeServerName) } daemonset := newDaemonset(podSpec, consts.NodeServerName, selectorValue, args) @@ -360,7 +355,7 @@ func (t daemonsetTask) doCreateLegacyDaemonset(ctx context.Context, args *Args) } } if selectorValue == "" { - selectorValue = fmt.Sprintf("%v-%v", consts.Identity, getRandSuffix()) + selectorValue = fmt.Sprintf("%v-%v", consts.Identity, consts.LegacyNodeServerName) } daemonset := newDaemonset(podSpec, consts.LegacyNodeServerName, selectorValue, args) diff --git a/pkg/admin/installer/deployment.go b/pkg/admin/installer/deployment.go index 429993a52..e64cc3db1 100644 --- a/pkg/admin/installer/deployment.go +++ b/pkg/admin/installer/deployment.go @@ -20,7 +20,6 @@ import ( "context" "fmt" - directpvtypes "github.com/minio/directpv/pkg/apis/directpv.min.io/types" "github.com/minio/directpv/pkg/client" "github.com/minio/directpv/pkg/consts" "github.com/minio/directpv/pkg/k8s" @@ -195,7 +194,7 @@ func (t deploymentTask) doCreateDeployment(ctx context.Context, args *Args, lega } } if selectorValue == "" { - selectorValue = fmt.Sprintf("%v-%v", consts.ControllerServerName, getRandSuffix()) + selectorValue = fmt.Sprintf("%v-%v", consts.ControllerServerName, name) } replicas := int32(3) @@ -207,11 +206,7 @@ func (t deploymentTask) doCreateDeployment(ctx context.Context, args *Args, lega ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, - Annotations: map[string]string{ - string(directpvtypes.ImageTagLabelKey): args.imageTag, - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, - }, - Labels: defaultLabels, + Labels: defaultLabels, }, Spec: appsv1.DeploymentSpec{ Replicas: &replicas, diff --git a/pkg/admin/installer/namespace.go b/pkg/admin/installer/namespace.go index 5e7a1fb80..233a3170c 100644 --- a/pkg/admin/installer/namespace.go +++ b/pkg/admin/installer/namespace.go @@ -19,7 +19,6 @@ package installer import ( "context" - directpvtypes "github.com/minio/directpv/pkg/apis/directpv.min.io/types" "github.com/minio/directpv/pkg/client" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -90,11 +89,8 @@ func (t namespaceTask) createNamespace(ctx context.Context, args *Args) (err err Kind: "Namespace", }, ObjectMeta: metav1.ObjectMeta{ - Name: namespace, - Namespace: metav1.NamespaceNone, - Annotations: map[string]string{ - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, - }, + Name: namespace, + Namespace: metav1.NamespaceNone, Labels: labels, Finalizers: []string{metav1.FinalizerDeleteDependents}, }, diff --git a/pkg/admin/installer/rbac.go b/pkg/admin/installer/rbac.go index 4bd1773b6..9a55d39b3 100644 --- a/pkg/admin/installer/rbac.go +++ b/pkg/admin/installer/rbac.go @@ -19,7 +19,6 @@ package installer import ( "context" - directpvtypes "github.com/minio/directpv/pkg/apis/directpv.min.io/types" "github.com/minio/directpv/pkg/client" "github.com/minio/directpv/pkg/consts" corev1 "k8s.io/api/core/v1" @@ -99,10 +98,7 @@ func (t rbacTask) createServiceAccount(ctx context.Context, args *Args) (err err ObjectMeta: metav1.ObjectMeta{ Name: consts.Identity, Namespace: namespace, - Annotations: map[string]string{ - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, - }, - Labels: defaultLabels, + Labels: defaultLabels, }, Secrets: []corev1.ObjectReference{}, ImagePullSecrets: []corev1.LocalObjectReference{}, @@ -142,7 +138,6 @@ func (t rbacTask) createClusterRole(ctx context.Context, args *Args) (err error) Namespace: metav1.NamespaceNone, Annotations: map[string]string{ "rbac.authorization.kubernetes.io/autoupdate": "true", - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, }, Labels: defaultLabels, }, @@ -153,16 +148,14 @@ func (t rbacTask) createClusterRole(ctx context.Context, args *Args) (err error) newPolicyRule([]string{"persistentvolumeclaims"}, nil, getVerb, listVerb, updateVerb, watchVerb), newPolicyRule([]string{"storageclasses"}, []string{"storage.k8s.io"}, getVerb, listVerb, watchVerb), newPolicyRule([]string{"events"}, nil, createVerb, listVerb, patchVerb, updateVerb, watchVerb), - newPolicyRule([]string{"volumesnapshots"}, []string{"snapshot.storage.k8s.io"}, getVerb, listVerb), - newPolicyRule([]string{"volumesnapshotcontents"}, []string{"snapshot.storage.k8s.io"}, getVerb, listVerb), newPolicyRule([]string{"csinodes"}, []string{"storage.k8s.io"}, getVerb, listVerb, watchVerb), newPolicyRule([]string{"nodes"}, nil, getVerb, listVerb, watchVerb), newPolicyRule([]string{"volumeattachments"}, []string{"storage.k8s.io"}, getVerb, listVerb, watchVerb), newPolicyRule([]string{"endpoints"}, nil, createVerb, deleteVerb, getVerb, listVerb, updateVerb, watchVerb), newPolicyRule([]string{"leases"}, []string{"coordination.k8s.io"}, createVerb, deleteVerb, getVerb, listVerb, updateVerb, watchVerb), newPolicyRule( - []string{"customresourcedefinitions", "customresourcedefinition"}, - []string{"apiextensions.k8s.io", consts.GroupName}, + []string{"customresourcedefinitions"}, + []string{"apiextensions.k8s.io"}, createVerb, deleteVerb, getVerb, listVerb, patchVerb, updateVerb, watchVerb, ), newPolicyRule( @@ -170,8 +163,8 @@ func (t rbacTask) createClusterRole(ctx context.Context, args *Args) (err error) []string{consts.GroupName}, createVerb, deleteVerb, getVerb, listVerb, updateVerb, watchVerb, ), - newPolicyRule([]string{"pods", "pod"}, nil, getVerb, listVerb, watchVerb), - newPolicyRule([]string{"secrets", "secret"}, nil, getVerb, listVerb, watchVerb), + newPolicyRule([]string{"pods"}, nil, getVerb, listVerb, watchVerb), + newPolicyRule([]string{"secrets"}, nil, getVerb, listVerb, watchVerb), }, AggregationRule: nil, } @@ -209,7 +202,6 @@ func (t rbacTask) createClusterRoleBinding(ctx context.Context, args *Args) (err Namespace: metav1.NamespaceNone, Annotations: map[string]string{ "rbac.authorization.kubernetes.io/autoupdate": "true", - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, }, Labels: defaultLabels, }, @@ -260,7 +252,6 @@ func (t rbacTask) createRole(ctx context.Context, args *Args) (err error) { Namespace: namespace, Annotations: map[string]string{ "rbac.authorization.kubernetes.io/autoupdate": "true", - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, }, Labels: defaultLabels, }, @@ -302,7 +293,6 @@ func (t rbacTask) createRoleBinding(ctx context.Context, args *Args) (err error) Namespace: namespace, Annotations: map[string]string{ "rbac.authorization.kubernetes.io/autoupdate": "true", - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, }, Labels: defaultLabels, }, diff --git a/pkg/admin/installer/storageclass.go b/pkg/admin/installer/storageclass.go index 8c4fce600..65142f048 100644 --- a/pkg/admin/installer/storageclass.go +++ b/pkg/admin/installer/storageclass.go @@ -101,11 +101,8 @@ func (t storageClassTask) doCreateStorageClass(ctx context.Context, args *Args, storageClass := &storagev1.StorageClass{ TypeMeta: metav1.TypeMeta{APIVersion: "storage.k8s.io/v1", Kind: "StorageClass"}, ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: metav1.NamespaceNone, - Annotations: map[string]string{ - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, - }, + Name: name, + Namespace: metav1.NamespaceNone, Labels: defaultLabels, Finalizers: []string{metav1.FinalizerDeleteDependents}, }, @@ -135,11 +132,8 @@ func (t storageClassTask) doCreateStorageClass(ctx context.Context, args *Args, storageClass := &storagev1beta1.StorageClass{ TypeMeta: metav1.TypeMeta{APIVersion: "storage.k8s.io/v1beta1", Kind: "StorageClass"}, ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: metav1.NamespaceNone, - Annotations: map[string]string{ - string(directpvtypes.PluginVersionLabelKey): args.PluginVersion, - }, + Name: name, + Namespace: metav1.NamespaceNone, Labels: defaultLabels, Finalizers: []string{metav1.FinalizerDeleteDependents}, }, diff --git a/pkg/admin/installer/utils.go b/pkg/admin/installer/utils.go index 3dd42bc74..4fb638c4b 100644 --- a/pkg/admin/installer/utils.go +++ b/pkg/admin/installer/utils.go @@ -18,10 +18,7 @@ package installer import ( "context" - "crypto/rand" - "encoding/base32" "path" - "strings" "github.com/minio/directpv/pkg/k8s" "k8s.io/klog/v2" @@ -31,14 +28,6 @@ func newPluginsSocketDir(kubeletDir, name string) string { return path.Join(kubeletDir, "plugins", k8s.SanitizeResourceName(name)) } -func getRandSuffix() string { - b := make([]byte, 5) - if _, err := rand.Read(b); err != nil { - klog.Fatalf("unable to generate random bytes; %v", err) - } - return strings.ToLower(base32.StdEncoding.EncodeToString(b)[:5]) -} - func sendDoneMessage(ctx context.Context, progressCh chan<- Message, err error) (sent bool) { sent = sendMessage(ctx, progressCh, newDoneMessage(err)) if !sent && err != nil { diff --git a/pkg/apis/directpv.min.io/types/label.go b/pkg/apis/directpv.min.io/types/label.go index 72425b63b..df569fe54 100644 --- a/pkg/apis/directpv.min.io/types/label.go +++ b/pkg/apis/directpv.min.io/types/label.go @@ -88,12 +88,6 @@ const ( // ClaimIDLabelKey label key to denote the claim id of the volumes ClaimIDLabelKey LabelKey = consts.GroupName + "/claim-id" - - // ImageTagLabelKey denotes the tag of the directpv container image - ImageTagLabelKey LabelKey = consts.GroupName + "/image-tag" - - // PluginVersionLabelKey denotes the plugin version - PluginVersionLabelKey LabelKey = consts.GroupName + "/plugin-version" ) var reservedLabelKeys = map[LabelKey]struct{}{ @@ -115,8 +109,6 @@ var reservedLabelKeys = map[LabelKey]struct{}{ SuspendLabelKey: {}, VolumeClaimIDLabelKey: {}, ClaimIDLabelKey: {}, - ImageTagLabelKey: {}, - PluginVersionLabelKey: {}, } // IsReserved returns if the key is a reserved key diff --git a/resources/base/CSIDriver.yaml b/resources/base/CSIDriver.yaml new file mode 100644 index 000000000..795d9485a --- /dev/null +++ b/resources/base/CSIDriver.yaml @@ -0,0 +1,17 @@ + +apiVersion: storage.k8s.io/v1 +kind: CSIDriver +metadata: + 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/resources/base/ClusterRole.yaml b/resources/base/ClusterRole.yaml new file mode 100644 index 000000000..505b7da0a --- /dev/null +++ b/resources/base/ClusterRole.yaml @@ -0,0 +1,151 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + annotations: + 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: + - 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 + resources: + - customresourcedefinitions + 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 + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch diff --git a/resources/base/ClusterRoleBinding.yaml b/resources/base/ClusterRoleBinding.yaml new file mode 100644 index 000000000..66e53a380 --- /dev/null +++ b/resources/base/ClusterRoleBinding.yaml @@ -0,0 +1,21 @@ + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + annotations: + 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/resources/base/DaemonSet.yaml b/resources/base/DaemonSet.yaml new file mode 100644 index 000000000..7659901a5 --- /dev/null +++ b/resources/base/DaemonSet.yaml @@ -0,0 +1,229 @@ + +apiVersion: apps/v1 +kind: DaemonSet +metadata: + 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-node-server + template: + metadata: + annotations: + created-by: kubectl-directpv + creationTimestamp: null + labels: + selector.directpv.min.io: directpv-min-io-node-server + 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:dafc7f667aa2e20d7f059c20db02dd6987c2624d64d8f166cd5930721be98ea9 + 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@sha256:83fd05fe114ed15c3975333c90cbe18c782d9c4d5c7ad6fdb8cc835e380ba505 + 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: /var/lib/direct-csi/ + mountPropagation: Bidirectional + name: direct-csi-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 + - 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@sha256:83fd05fe114ed15c3975333c90cbe18c782d9c4d5c7ad6fdb8cc835e380ba505 + 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: /var/lib/direct-csi/ + mountPropagation: Bidirectional + name: direct-csi-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 + - args: + - --csi-address=/csi/csi.sock + - --health-port=9898 + image: quay.io/minio/livenessprobe@sha256:783010e10e4d74b6b2b157a4b52772c5a264fd76bb2ad671054b8c3f706c8324 + 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: /var/lib/direct-csi/ + type: DirectoryOrCreate + name: direct-csi-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 + updateStrategy: + type: RollingUpdate +status: + currentNumberScheduled: 0 + desiredNumberScheduled: 0 + numberMisscheduled: 0 + numberReady: 0 diff --git a/resources/base/Deployment.yaml b/resources/base/Deployment.yaml new file mode 100644 index 000000000..75d2c9a44 --- /dev/null +++ b/resources/base/Deployment.yaml @@ -0,0 +1,117 @@ + +apiVersion: apps/v1 +kind: Deployment +metadata: + 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-controller + strategy: + type: Recreate + template: + metadata: + annotations: + created-by: kubectl-directpv + creationTimestamp: null + labels: + selector.directpv.min.io: controller-controller + 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:fc1f992dd5591357fa123c396aaadaea5033f312b9c136a11d62cf698474bebb + 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:58fa627393f20892b105a137d27e236dfaec233a3a64980f84dcb15f38c21533 + 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@sha256:83fd05fe114ed15c3975333c90cbe18c782d9c4d5c7ad6fdb8cc835e380ba505 + 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/resources/base/Namespace.yaml b/resources/base/Namespace.yaml new file mode 100644 index 000000000..8ed8d8063 --- /dev/null +++ b/resources/base/Namespace.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Namespace +metadata: + 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/resources/base/Role.yaml b/resources/base/Role.yaml new file mode 100644 index 000000000..afe125e39 --- /dev/null +++ b/resources/base/Role.yaml @@ -0,0 +1,26 @@ + +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + annotations: + 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/resources/base/RoleBinding.yaml b/resources/base/RoleBinding.yaml new file mode 100644 index 000000000..b1f5f46a7 --- /dev/null +++ b/resources/base/RoleBinding.yaml @@ -0,0 +1,22 @@ + +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + annotations: + 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/resources/base/ServiceAccount.yaml b/resources/base/ServiceAccount.yaml new file mode 100644 index 000000000..f0ccf775f --- /dev/null +++ b/resources/base/ServiceAccount.yaml @@ -0,0 +1,12 @@ + +apiVersion: v1 +kind: ServiceAccount +metadata: + 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/resources/base/StorageClass.yaml b/resources/base/StorageClass.yaml new file mode 100644 index 000000000..05c3ea016 --- /dev/null +++ b/resources/base/StorageClass.yaml @@ -0,0 +1,24 @@ + +allowVolumeExpansion: true +allowedTopologies: +- matchLabelExpressions: + - key: directpv.min.io/identity + values: + - directpv-min-io +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + 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/resources/base/directpvdrives.directpv.min.io.yaml b/resources/base/directpvdrives.directpv.min.io.yaml new file mode 100644 index 000000000..a242f4a36 --- /dev/null +++ b/resources/base/directpvdrives.directpv.min.io.yaml @@ -0,0 +1,166 @@ + +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.15.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.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" + 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/resources/base/directpvinitrequests.directpv.min.io.yaml b/resources/base/directpvinitrequests.directpv.min.io.yaml new file mode 100644 index 000000000..99c959ab5 --- /dev/null +++ b/resources/base/directpvinitrequests.directpv.min.io.yaml @@ -0,0 +1,102 @@ + +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.15.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/resources/base/directpvnodes.directpv.min.io.yaml b/resources/base/directpvnodes.directpv.min.io.yaml new file mode 100644 index 000000000..362082b71 --- /dev/null +++ b/resources/base/directpvnodes.directpv.min.io.yaml @@ -0,0 +1,168 @@ + +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.15.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.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" + 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/resources/base/directpvvolumes.directpv.min.io.yaml b/resources/base/directpvvolumes.directpv.min.io.yaml new file mode 100644 index 000000000..bfd7fc2d5 --- /dev/null +++ b/resources/base/directpvvolumes.directpv.min.io.yaml @@ -0,0 +1,160 @@ + +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.15.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.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" + 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/resources/base/kustomization.yaml b/resources/base/kustomization.yaml new file mode 100644 index 000000000..813ffd06b --- /dev/null +++ b/resources/base/kustomization.yaml @@ -0,0 +1,35 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - Namespace.yaml + - directpvdrives.directpv.min.io.yaml + - directpvinitrequests.directpv.min.io.yaml + - directpvnodes.directpv.min.io.yaml + - directpvvolumes.directpv.min.io.yaml + - CSIDriver.yaml + - StorageClass.yaml + - ServiceAccount.yaml + - ClusterRole.yaml + - ClusterRoleBinding.yaml + - Role.yaml + - RoleBinding.yaml + - DaemonSet.yaml + - Deployment.yaml + +images: + - name: quay.io/minio/directpv + digest: sha256:83fd05fe114ed15c3975333c90cbe18c782d9c4d5c7ad6fdb8cc835e380ba505 + + - name: quay.io/minio/csi-node-driver-registrar + digest: sha256:dafc7f667aa2e20d7f059c20db02dd6987c2624d64d8f166cd5930721be98ea9 + + - name: quay.io/minio/livenessprobe + digest: sha256:783010e10e4d74b6b2b157a4b52772c5a264fd76bb2ad671054b8c3f706c8324 + + - name: quay.io/minio/csi-provisioner + digest: sha256:fc1f992dd5591357fa123c396aaadaea5033f312b9c136a11d62cf698474bebb + + - name: quay.io/minio/csi-resizer + digest: sha256:58fa627393f20892b105a137d27e236dfaec233a3a64980f84dcb15f38c21533 + diff --git a/resources/legacy/CSIDriver.yaml b/resources/legacy/CSIDriver.yaml new file mode 100644 index 000000000..7ac84861c --- /dev/null +++ b/resources/legacy/CSIDriver.yaml @@ -0,0 +1,17 @@ + +apiVersion: storage.k8s.io/v1 +kind: CSIDriver +metadata: + creationTimestamp: null + labels: + application-name: directpv.min.io + application-type: CSIDriver + directpv.min.io/created-by: kubectl-directpv + directpv.min.io/version: v1beta1 + name: direct-csi-min-io +spec: + attachRequired: false + podInfoOnMount: true + volumeLifecycleModes: + - Persistent + - Ephemeral diff --git a/resources/legacy/DaemonSet.yaml b/resources/legacy/DaemonSet.yaml new file mode 100644 index 000000000..1dbf1156a --- /dev/null +++ b/resources/legacy/DaemonSet.yaml @@ -0,0 +1,182 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + creationTimestamp: null + labels: + application-name: directpv.min.io + application-type: CSIDriver + directpv.min.io/created-by: kubectl-directpv + directpv.min.io/version: v1beta1 + name: legacy-node-server + namespace: directpv +spec: + selector: + matchLabels: + selector.directpv.min.io: directpv-node-server + template: + metadata: + annotations: + created-by: kubectl-directpv + creationTimestamp: null + labels: + selector.directpv.min.io: directpv-node-server + selector.directpv.min.io.service: enabled + name: legacy-node-server + namespace: directpv + spec: + containers: + - args: + - --v=3 + - --csi-address=unix:///csi/csi.sock + - --kubelet-registration-path=/var/lib/kubelet/plugins/direct-csi-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:dafc7f667aa2e20d7f059c20db02dd6987c2624d64d8f166cd5930721be98ea9 + 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: + - legacy-node-server + - -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@sha256:83fd05fe114ed15c3975333c90cbe18c782d9c4d5c7ad6fdb8cc835e380ba505 + 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: /var/lib/direct-csi/ + mountPropagation: Bidirectional + name: direct-csi-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 + - args: + - --csi-address=/csi/csi.sock + - --health-port=9898 + image: quay.io/minio/livenessprobe@sha256:783010e10e4d74b6b2b157a4b52772c5a264fd76bb2ad671054b8c3f706c8324 + 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/direct-csi-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: /var/lib/direct-csi/ + type: DirectoryOrCreate + name: direct-csi-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 + updateStrategy: + type: RollingUpdate +status: + currentNumberScheduled: 0 + desiredNumberScheduled: 0 + numberMisscheduled: 0 + numberReady: 0 diff --git a/resources/legacy/Deployment.yaml b/resources/legacy/Deployment.yaml new file mode 100644 index 000000000..0b1ae1c84 --- /dev/null +++ b/resources/legacy/Deployment.yaml @@ -0,0 +1,116 @@ + +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + application-name: directpv.min.io + application-type: CSIDriver + directpv.min.io/created-by: kubectl-directpv + directpv.min.io/version: v1beta1 + name: legacy-controller + namespace: directpv +spec: + replicas: 3 + selector: + matchLabels: + selector.directpv.min.io: directpv-controller + strategy: + type: Recreate + template: + metadata: + annotations: + created-by: kubectl-directpv + creationTimestamp: null + labels: + selector.directpv.min.io: directpv-controller + name: legacy-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:fc1f992dd5591357fa123c396aaadaea5033f312b9c136a11d62cf698474bebb + 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:58fa627393f20892b105a137d27e236dfaec233a3a64980f84dcb15f38c21533 + 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: + - legacy-controller + - -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@sha256:83fd05fe114ed15c3975333c90cbe18c782d9c4d5c7ad6fdb8cc835e380ba505 + 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/resources/legacy/StorageClass.yaml b/resources/legacy/StorageClass.yaml new file mode 100644 index 000000000..692e93e72 --- /dev/null +++ b/resources/legacy/StorageClass.yaml @@ -0,0 +1,24 @@ + +allowVolumeExpansion: true +allowedTopologies: +- matchLabelExpressions: + - key: directpv.min.io/identity + values: + - directpv-min-io +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + 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: direct-csi-min-io +parameters: + csi.storage.k8s.io/fstype: xfs +provisioner: directpv-min-io +reclaimPolicy: Delete +volumeBindingMode: WaitForFirstConsumer diff --git a/resources/legacy/kustomization.yaml b/resources/legacy/kustomization.yaml new file mode 100644 index 000000000..61aa767cf --- /dev/null +++ b/resources/legacy/kustomization.yaml @@ -0,0 +1,26 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../base + - CSIDriver.yaml + - DaemonSet.yaml + - Deployment.yaml + - StorageClass.yaml + +images: + - name: quay.io/minio/directpv + digest: sha256:83fd05fe114ed15c3975333c90cbe18c782d9c4d5c7ad6fdb8cc835e380ba505 + + - name: quay.io/minio/csi-node-driver-registrar + digest: sha256:dafc7f667aa2e20d7f059c20db02dd6987c2624d64d8f166cd5930721be98ea9 + + - name: quay.io/minio/livenessprobe + digest: sha256:783010e10e4d74b6b2b157a4b52772c5a264fd76bb2ad671054b8c3f706c8324 + + - name: quay.io/minio/csi-provisioner + digest: sha256:fc1f992dd5591357fa123c396aaadaea5033f312b9c136a11d62cf698474bebb + + - name: quay.io/minio/csi-resizer + digest: sha256:58fa627393f20892b105a137d27e236dfaec233a3a64980f84dcb15f38c21533 + diff --git a/resources/openshift-with-legacy/kustomization.yaml b/resources/openshift-with-legacy/kustomization.yaml new file mode 100644 index 000000000..2288b7d60 --- /dev/null +++ b/resources/openshift-with-legacy/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../legacy + +images: + - name: quay.io/minio/csi-node-driver-registrar + newName: registry.redhat.io/openshift4/ose-csi-node-driver-registrar-rhel8 + digest: sha256:ab54e6a2e8a6a1ca2da5aaf25f784c09f5bf22ea32224ec1bdb6c564f88695a9 + + - name: quay.io/minio/livenessprobe + newName: registry.redhat.io/openshift4/ose-csi-livenessprobe-rhel8 + digest: sha256:b28029f929fe2a28e666910d1acc57c3474fabdb2f9129688ef1ca56c7231d90 + + - name: quay.io/minio/csi-provisioner + newName: registry.redhat.io/openshift4/ose-csi-external-provisioner-rhel8 + digest: sha256:8bf8aa8975790e19ba107fd58699f98389e3fb692d192f4df3078fff7f0a4bba + + - name: quay.io/minio/csi-resizer@sha256:58fa627393f20892b105a137d27e236dfaec233a3a64980f84dcb15f38c21533 + newName: registry.redhat.io/openshift4/ose-csi-external-resizer-rhel8 + digest: sha256:bed8de36bac80108909205342b2d92e4de5adbfa33bf13f9346236fca52a0d3e diff --git a/resources/openshift/kustomization.yaml b/resources/openshift/kustomization.yaml new file mode 100644 index 000000000..2b23416c8 --- /dev/null +++ b/resources/openshift/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../base + +images: + - name: quay.io/minio/csi-node-driver-registrar + newName: registry.redhat.io/openshift4/ose-csi-node-driver-registrar-rhel8 + digest: sha256:ab54e6a2e8a6a1ca2da5aaf25f784c09f5bf22ea32224ec1bdb6c564f88695a9 + + - name: quay.io/minio/livenessprobe + newName: registry.redhat.io/openshift4/ose-csi-livenessprobe-rhel8 + digest: sha256:b28029f929fe2a28e666910d1acc57c3474fabdb2f9129688ef1ca56c7231d90 + + - name: quay.io/minio/csi-provisioner + newName: registry.redhat.io/openshift4/ose-csi-external-provisioner-rhel8 + digest: sha256:8bf8aa8975790e19ba107fd58699f98389e3fb692d192f4df3078fff7f0a4bba + + - name: quay.io/minio/csi-resizer@sha256:58fa627393f20892b105a137d27e236dfaec233a3a64980f84dcb15f38c21533 + newName: registry.redhat.io/openshift4/ose-csi-external-resizer-rhel8 + digest: sha256:bed8de36bac80108909205342b2d92e4de5adbfa33bf13f9346236fca52a0d3e