diff --git a/ci/upgrade/cstor/ndm-operator.yaml b/ci/upgrade/cstor/ndm-operator.yaml deleted file mode 100644 index 9ac76aef..00000000 --- a/ci/upgrade/cstor/ndm-operator.yaml +++ /dev/null @@ -1,247 +0,0 @@ -# Copyright © 2020-2021 The OpenEBS Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This is the node-disk-manager related config. -# It can be used to customize the disks probes and filters -apiVersion: v1 -kind: ConfigMap -metadata: - name: openebs-ndm-config - namespace: openebs - labels: - openebs.io/component-name: ndm-config -data: - # udev-probe is default or primary probe which should be enabled to run ndm - # filterconfigs contails configs of filters - in their form fo include - # and exclude comma separated strings - node-disk-manager.config: | - probeconfigs: - - key: udev-probe - name: udev probe - state: true - - key: seachest-probe - name: seachest probe - state: false - - key: smart-probe - name: smart probe - state: true - filterconfigs: - - key: os-disk-exclude-filter - name: os disk exclude filter - state: true - exclude: "/,/etc/hosts,/boot" - - key: vendor-filter - name: vendor filter - state: true - include: "" - exclude: "CLOUDBYT,OpenEBS" - - key: path-filter - name: path filter - state: true - include: "" - exclude: "loop,/dev/fd0,/dev/sr0,/dev/ram,/dev/dm-,/dev/md,/dev/rbd" ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: openebs-ndm - namespace: openebs - labels: - name: openebs-ndm - openebs.io/component-name: ndm - openebs.io/version: 2.0.0 -spec: - selector: - matchLabels: - name: openebs-ndm - openebs.io/component-name: ndm - updateStrategy: - type: RollingUpdate - template: - metadata: - labels: - name: openebs-ndm - openebs.io/component-name: ndm - openebs.io/version: 2.0.0 - spec: - # By default the node-disk-manager will be run on all kubernetes nodes - # If you would like to limit this to only some nodes, say the nodes - # that have storage attached, you could label those node and use - # nodeSelector. - # - # e.g. label the storage nodes with - "openebs.io/nodegroup"="storage-node" - # kubectl label node "openebs.io/nodegroup"="storage-node" - #nodeSelector: - # "openebs.io/nodegroup": "storage-node" - serviceAccountName: openebs-maya-operator - hostNetwork: true - # host PID is used to check status of iSCSI Service when the NDM - # API service is enabled - #hostPID: true - containers: - - name: node-disk-manager - image: openebs/node-disk-manager:0.8.2 - args: - - -v=4 - # The feature-gate is used to enable the new UUID algorithm. - - --feature-gates="GPTBasedUUID" - # The feature gate is used to start the gRPC API service. The gRPC server - # starts at 9115 port by default. This feature is currently in Alpha state - # - --feature-gates="APIService" - imagePullPolicy: IfNotPresent - securityContext: - privileged: true - volumeMounts: - - name: config - mountPath: /host/node-disk-manager.config - subPath: node-disk-manager.config - readOnly: true - - name: udev - mountPath: /run/udev - - name: procmount - mountPath: /host/proc - readOnly: true - - name: devmount - mountPath: /dev - - name: basepath - mountPath: /var/openebs/ndm - - name: sparsepath - mountPath: /var/openebs/sparse - env: - # namespace in which NDM is installed will be passed to NDM Daemonset - # as environment variable - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - # pass hostname as env variable using downward API to the NDM container - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - # specify the directory where the sparse files need to be created. - # if not specified, then sparse files will not be created. - - name: SPARSE_FILE_DIR - value: "/var/openebs/sparse" - # Size(bytes) of the sparse file to be created. - - name: SPARSE_FILE_SIZE - value: "10737418240" - # Specify the number of sparse files to be created - - name: SPARSE_FILE_COUNT - value: "1" - livenessProbe: - exec: - command: - - pgrep - - "ndm" - initialDelaySeconds: 30 - periodSeconds: 60 - volumes: - - name: config - configMap: - name: openebs-ndm-config - - name: udev - hostPath: - path: /run/udev - type: Directory - # mount /proc (to access mount file of process 1 of host) inside container - # to read mount-point of disks and partitions - - name: procmount - hostPath: - path: /proc - type: Directory - - name: devmount - # the /dev directory is mounted so that we have access to the devices that - # are connected at runtime of the pod. - hostPath: - path: /dev - type: Directory - - name: basepath - hostPath: - path: /var/openebs/ndm - type: DirectoryOrCreate - - name: sparsepath - hostPath: - path: /var/openebs/sparse ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: openebs-ndm-operator - namespace: openebs - labels: - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - openebs.io/version: 2.0.0 -spec: - selector: - matchLabels: - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - replicas: 1 - strategy: - type: Recreate - template: - metadata: - labels: - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - openebs.io/version: 2.0.0 - spec: - serviceAccountName: openebs-maya-operator - containers: - - name: node-disk-operator - image: openebs/node-disk-operator:0.8.2 - imagePullPolicy: IfNotPresent - readinessProbe: - exec: - command: - - stat - - /tmp/operator-sdk-ready - initialDelaySeconds: 4 - periodSeconds: 10 - failureThreshold: 1 - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - # the service account of the ndm-operator pod - - name: SERVICE_ACCOUNT - valueFrom: - fieldRef: - fieldPath: spec.serviceAccountName - - name: OPERATOR_NAME - value: "node-disk-operator" - - name: CLEANUP_JOB_IMAGE - value: "openebs/linux-utils:2.0.0" - # OPENEBS_IO_INSTALL_CRD environment variable is used to enable/disable CRD installation - # from NDM operator. By default the CRDs will be installed - #- name: OPENEBS_IO_INSTALL_CRD - # value: "true" - # Process name used for matching is limited to the 15 characters - # present in the pgrep output. - # So fullname can be used here with pgrep (cmd is < 15 chars). - livenessProbe: - exec: - command: - - pgrep - - "ndo" - initialDelaySeconds: 30 - periodSeconds: 60 ---- \ No newline at end of file diff --git a/ci/upgrade/cstor/setup.sh b/ci/upgrade/cstor/setup.sh index 1db675a2..b654b3d5 100755 --- a/ci/upgrade/cstor/setup.sh +++ b/ci/upgrade/cstor/setup.sh @@ -21,8 +21,7 @@ echo "Install cstor-operators in 2.0.0" kubectl create ns openebs -kubectl apply -f https://raw.githubusercontent.com/openebs/charts/gh-pages/versioned/2.0.0/cstor-operator.yaml \ - -f ./ci/upgrade/cstor/ndm-operator.yaml +kubectl apply -f https://openebs.github.io/charts/versioned/2.8.0/cstor-operator.yaml sleep 100 echo "Wait for cspc-operator to start" diff --git a/ci/upgrade/jiva/setup.sh b/ci/upgrade/jiva/setup.sh index a87fb8a2..4520a371 100755 --- a/ci/upgrade/jiva/setup.sh +++ b/ci/upgrade/jiva/setup.sh @@ -17,12 +17,12 @@ set -ex -echo "Install jiva-operator in 2.7.0" +echo "Install jiva-operator in 2.8.0" kubectl create ns openebs -kubectl apply -f https://raw.githubusercontent.com/openebs/charts/gh-pages/versioned/2.7.0/jiva-operator.yaml \ - -f https://raw.githubusercontent.com/openebs/charts/gh-pages/versioned/2.7.0/openebs-operator.yaml +kubectl apply -f https://openebs.github.io/charts/versioned/2.8.0/jiva-operator.yaml \ + -f https://https://openebs.github.io/charts/versioned/2.8.0/openebs-operator.yaml sleep 100 echo "Wait for jiva-operator to start" diff --git a/ci/upgrade/upgradetaskCRD.yaml b/ci/upgrade/upgradetaskCRD.yaml index 479a4a79..4c1d894d 100644 --- a/ci/upgrade/upgradetaskCRD.yaml +++ b/ci/upgrade/upgradetaskCRD.yaml @@ -17,8 +17,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: upgradetasks.openebs.io spec: group: openebs.io @@ -29,242 +28,236 @@ spec: singular: upgradetask scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: UpgradeTask represents an upgrade task - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation + - name: v1alpha1 + schema: + openAPIV3Schema: + description: UpgradeTask represents an upgrade task + 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 + 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 i.e. specifications of the UpgradeTask - properties: - cstorPool: - description: CStorPool contains the details of the cstor pool to be - upgraded - properties: - options: - description: Options can be used to change the default behaviour - of upgrade - properties: - ignoreStepsOnError: - description: IgnoreStepsOnError allows to ignore steps which - failed - items: - type: string - type: array - type: object - poolName: - description: PoolName contains the name of the cstor pool to be - upgraded - type: string - type: object - cstorPoolCluster: - description: CStorPoolCluster contains the details of the storage - pool claim to be upgraded - properties: - cspcName: - description: CSPCName contains the name of the storage pool claim - to be upgraded - type: string - options: - description: Options can be used to change the default behaviour - of upgrade - properties: - ignoreStepsOnError: - description: IgnoreStepsOnError allows to ignore steps which - failed - items: - type: string - type: array - type: object - type: object - cstorPoolInstance: - description: CStorPoolInstance contains the details of the cstor pool - to be upgraded - properties: - cspiName: - description: CSPCName contains the name of the storage pool claim - to be upgraded - type: string - options: - description: Options can be used to change the default behaviour - of upgrade - properties: - ignoreStepsOnError: - description: IgnoreStepsOnError allows to ignore steps which - failed - items: - type: string - type: array - type: object - type: object - cstorVolume: - description: CStorVolume contains the details of the cstor volume - to be upgraded - properties: - options: - description: Options can be used to change the default behaviour - of upgrade - properties: - ignoreStepsOnError: - description: IgnoreStepsOnError allows to ignore steps which - failed - items: - type: string - type: array - type: object - pvName: - description: PVName contains the name of the pv associated with - the cstor volume - type: string - type: object - fromVersion: - description: FromVersion is the current version of the resource. - type: string - imagePrefix: - description: ImagePrefix contains the url prefix of the image url. - This field is optional. If not present upgrade takes the previously - present ImagePrefix. - type: string - imageTag: - description: ImageTag contains the customized tag for ToVersion if - any. This field is optional. If not present upgrade takes the ToVersion - as the ImageTag - type: string - jivaVolume: - description: JivaVolume contains the details of the jiva volume to - be upgraded - properties: - options: - description: Options can be used to change the default behaviour - of upgrade - properties: - ignoreStepsOnError: - description: IgnoreStepsOnError allows to ignore steps which - failed - items: - type: string - type: array - type: object - pvName: - description: PVName contains the name of the pv associated with - the jiva volume - type: string - type: object - options: - description: Options contains the optional flags that can be passed - during upgrade. - properties: - timeout: - description: Timeout is maximum seconds to wait at any given step - in the upgrade - type: integer - type: object - storagePoolClaim: - description: StoragePoolClaim contains the details of the storage - pool claim to be upgraded - properties: - options: - description: Options can be used to change the default behaviour - of upgrade - properties: - ignoreStepsOnError: - description: IgnoreStepsOnError allows to ignore steps which - failed - items: - type: string - type: array - type: object - spcName: - description: SPCName contains the name of the storage pool claim - to be upgraded - type: string - type: object - toVersion: - description: ToVersion is the upgraded version of the resource. It - should be same as the version of control plane components version. - type: string - required: - - fromVersion - - toVersion - type: object - status: - description: Status of UpgradeTask - properties: - completedTime: - description: CompletedTime of Upgrade - format: date-time - nullable: true - type: string - phase: - description: Phase indicates if a upgradeTask is started, success - or errored - type: string - retries: - description: Retries is the number of times the job attempted to upgrade - the resource - type: integer - startTime: - description: StartTime of Upgrade - format: date-time - nullable: true - type: string - upgradeDetailedStatuses: - description: UpgradeDetailedStatuses contains the list of statuses - of each step - items: - description: UpgradeDetailedStatuses represents the latest available - observations of a UpgradeTask current state. + type: string + metadata: + type: object + spec: + description: Spec i.e. specifications of the UpgradeTask + properties: + cstorPool: + description: CStorPool contains the details of the cstor pool to be + upgraded properties: - lastUpdatedAt: - description: LastUpdatedTime of a UpgradeStep - format: date-time - nullable: true + options: + description: Options can be used to change the default behaviour + of upgrade + properties: + ignoreStepsOnError: + description: IgnoreStepsOnError allows to ignore steps which + failed + items: + type: string + type: array + type: object + poolName: + description: PoolName contains the name of the cstor pool to be + upgraded type: string - message: - description: A human-readable message indicating details about - why the upgradeStep is in this state + type: object + cstorPoolCluster: + description: CStorPoolCluster contains the details of the storage + pool claim to be upgraded + properties: + cspcName: + description: CSPCName contains the name of the storage pool claim + to be upgraded type: string - phase: - description: Phase indicates if the UpgradeStep is waiting, - errored or completed. + options: + description: Options can be used to change the default behaviour + of upgrade + properties: + ignoreStepsOnError: + description: IgnoreStepsOnError allows to ignore steps which + failed + items: + type: string + type: array + type: object + type: object + cstorPoolInstance: + description: CStorPoolInstance contains the details of the cstor pool + to be upgraded + properties: + cspiName: + description: CSPCName contains the name of the storage pool claim + to be upgraded type: string - reason: - description: Reason is a brief CamelCase string that describes - any failure and is meant for machine parsing and tidy display - in the CLI + options: + description: Options can be used to change the default behaviour + of upgrade + properties: + ignoreStepsOnError: + description: IgnoreStepsOnError allows to ignore steps which + failed + items: + type: string + type: array + type: object + type: object + cstorVolume: + description: CStorVolume contains the details of the cstor volume + to be upgraded + properties: + options: + description: Options can be used to change the default behaviour + of upgrade + properties: + ignoreStepsOnError: + description: IgnoreStepsOnError allows to ignore steps which + failed + items: + type: string + type: array + type: object + pvName: + description: PVName contains the name of the pv associated with + the cstor volume type: string - startTime: - description: StartTime of a UpgradeStep - format: date-time - nullable: true + type: object + fromVersion: + description: FromVersion is the current version of the resource. + type: string + imagePrefix: + description: ImagePrefix contains the url prefix of the image url. + This field is optional. If not present upgrade takes the previously + present ImagePrefix. + type: string + imageTag: + description: ImageTag contains the customized tag for ToVersion if + any. This field is optional. If not present upgrade takes the ToVersion + as the ImageTag + type: string + jivaVolume: + description: JivaVolume contains the details of the jiva volume to + be upgraded + properties: + options: + description: Options can be used to change the default behaviour + of upgrade + properties: + ignoreStepsOnError: + description: IgnoreStepsOnError allows to ignore steps which + failed + items: + type: string + type: array + type: object + pvName: + description: PVName contains the name of the pv associated with + the jiva volume type: string - step: - description: UpgradeStep is the current step being performed - for a particular resource upgrade + type: object + options: + description: Options contains the optional flags that can be passed + during upgrade. + properties: + timeout: + description: Timeout is maximum seconds to wait at any given step + in the upgrade + type: integer + type: object + storagePoolClaim: + description: StoragePoolClaim contains the details of the storage + pool claim to be upgraded + properties: + options: + description: Options can be used to change the default behaviour + of upgrade + properties: + ignoreStepsOnError: + description: IgnoreStepsOnError allows to ignore steps which + failed + items: + type: string + type: array + type: object + spcName: + description: SPCName contains the name of the storage pool claim + to be upgraded type: string type: object - type: array - type: object - required: - - spec - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + toVersion: + description: ToVersion is the upgraded version of the resource. It + should be same as the version of control plane components version. + type: string + required: + - fromVersion + - toVersion + type: object + status: + description: Status of UpgradeTask + properties: + completedTime: + description: CompletedTime of Upgrade + format: date-time + nullable: true + type: string + phase: + description: Phase indicates if a upgradeTask is started, success + or errored + type: string + retries: + description: Retries is the number of times the job attempted to upgrade + the resource + type: integer + startTime: + description: StartTime of Upgrade + format: date-time + nullable: true + type: string + upgradeDetailedStatuses: + description: UpgradeDetailedStatuses contains the list of statuses + of each step + items: + description: UpgradeDetailedStatuses represents the latest available + observations of a UpgradeTask current state. + properties: + lastUpdatedAt: + description: LastUpdatedTime of a UpgradeStep + format: date-time + nullable: true + type: string + message: + description: A human-readable message indicating details about + why the upgradeStep is in this state + type: string + phase: + description: Phase indicates if the UpgradeStep is waiting, + errored or completed. + type: string + reason: + description: Reason is a brief CamelCase string that describes + any failure and is meant for machine parsing and tidy display + in the CLI + type: string + startTime: + description: StartTime of a UpgradeStep + format: date-time + nullable: true + type: string + step: + description: UpgradeStep is the current step being performed + for a particular resource upgrade + type: string + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true \ No newline at end of file