From c402e40f54cd8df7df29bc4eaf8dd5f71a3cf2ad Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Mon, 8 Mar 2021 18:15:53 -0700 Subject: [PATCH] ceph: load test crds from files or urls The integration tests will now read the manifests from the same source that is used in the examples for installation. No longer is there a need for a copy of the CRDs in the integration test code. The tests will read the manifests directly from disk under a path relative to the rook root. The upgrade test will read the manifests from a github url where the base version has been published. Signed-off-by: Travis Nielsen --- Jenkinsfile | 2 +- tests/framework/installer/ceph_manifests.go | 2245 +---------------- .../installer/ceph_manifests_v1.5.go | 718 +----- 3 files changed, 48 insertions(+), 2917 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bcb305226..45d911121 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -150,7 +150,7 @@ pipeline { } steps { sh 'cat _output/version | xargs tests/scripts/makeTestImages.sh save amd64' - stash name: 'repo-amd64',includes: 'ceph-amd64.tar,cassandra-amd64.tar,nfs-amd64.tar,build/common.sh,_output/tests/linux_amd64/,_output/charts/,tests/scripts/,cluster/charts/' + stash name: 'repo-amd64',includes: 'ceph-amd64.tar,cassandra-amd64.tar,nfs-amd64.tar,build/common.sh,_output/tests/linux_amd64/,_output/charts/,tests/scripts/,cluster/' script { def data = [ "aws_1.15.x": "v1.15.12", diff --git a/tests/framework/installer/ceph_manifests.go b/tests/framework/installer/ceph_manifests.go index 631da842e..6f40153dd 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -18,18 +18,16 @@ package installer import ( "fmt" + "io/ioutil" + "path" "strconv" "strings" + "github.com/pkg/errors" cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1" "github.com/rook/rook/tests/framework/utils" ) -const ( - // The version from which the upgrade test will start - Version1_5 = "v1.5.8" -) - type CephManifests interface { GetRookCRDs(v1ExtensionsSupported bool) string GetRookOperator(namespace string) string @@ -89,2234 +87,35 @@ func NewCephManifests(version string) CephManifests { case VersionMaster: return &CephManifestsMaster{imageTag: VersionMaster} case Version1_5: - return &CephManifestsV1_4{imageTag: Version1_5} + return &CephManifestsV1_5{imageTag: Version1_5} } panic(fmt.Errorf("unrecognized ceph manifest version: %s", version)) } +func readManifest(filename string) string { + rootDir, err := utils.FindRookRoot() + if err != nil { + panic(err) + } + manifest := path.Join(rootDir, "cluster/examples/kubernetes/ceph", filename) + logger.Infof("Reading manifest: %s", manifest) + contents, err := ioutil.ReadFile(manifest) + if err != nil { + panic(errors.Wrapf(err, "failed to read manifest at %s", manifest)) + } + return string(contents) +} + func (m *CephManifestsMaster) GetRookCRDs(v1ExtensionsSupported bool) string { if v1ExtensionsSupported { - return ` -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephclusters.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephCluster - plural: cephclusters - singular: cephcluster - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - cephVersion: - type: object - properties: - allowUnsupported: - type: boolean - image: - type: string - dashboard: - type: object - properties: - enabled: - type: boolean - urlPrefix: - type: string - port: - type: integer - minimum: 0 - maximum: 65535 - ssl: - type: boolean - dataDirHostPath: - pattern: ^/(\S+) - type: string - disruptionManagement: - type: object - properties: - machineDisruptionBudgetNamespace: - type: string - managePodBudgets: - type: boolean - osdMaintenanceTimeout: - type: integer - pgHealthCheckTimeout: - type: integer - manageMachineDisruptionBudgets: - type: boolean - skipUpgradeChecks: - type: boolean - continueUpgradeAfterChecksEvenIfNotHealthy: - type: boolean - mon: - type: object - properties: - allowMultiplePerNode: - type: boolean - count: - maximum: 9 - minimum: 0 - type: integer - volumeClaimTemplate: - type: object - x-kubernetes-preserve-unknown-fields: true - stretchCluster: - type: object - nullable: true - properties: - failureDomainLabel: - type: string - subFailureDomain: - type: string - zones: - type: array - items: - type: object - properties: - name: - type: string - arbiter: - type: boolean - volumeClaimTemplate: - type: object - x-kubernetes-preserve-unknown-fields: true - mgr: - type: object - properties: - modules: - type: array - items: - type: object - properties: - name: - type: string - enabled: - type: boolean - crashCollector: - type: object - properties: - disable: - type: boolean - daysToRetain: - type: integer - network: - type: object - nullable: true - properties: - hostNetwork: - type: boolean - provider: - type: string - selectors: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - ipFamily: - type: string - storage: - type: object - properties: - disruptionManagement: - type: object - nullable: true - properties: - machineDisruptionBudgetNamespace: - type: string - managePodBudgets: - type: boolean - osdMaintenanceTimeout: - type: integer - pgHealthCheckTimeout: - type: integer - manageMachineDisruptionBudgets: - type: boolean - useAllNodes: - type: boolean - nodes: - type: array - nullable: true - items: - type: object - properties: - name: - type: string - config: - type: object - nullable: true - properties: - metadataDevice: - type: string - storeType: - type: string - pattern: ^(bluestore)$ - databaseSizeMB: - type: string - walSizeMB: - type: string - journalSizeMB: - type: string - osdsPerDevice: - type: string - encryptedDevice: - type: string - pattern: ^(true|false)$ - useAllDevices: - type: boolean - deviceFilter: - type: string - nullable: true - devicePathFilter: - type: string - devices: - type: array - items: - type: object - properties: - name: - type: string - fullPath: - type: string - config: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - resources: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - useAllDevices: - type: boolean - deviceFilter: - type: string - nullable: true - devicePathFilter: - type: string - config: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - devices: - type: array - items: - type: object - properties: - name: - type: string - fullPath: - type: string - config: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - storageClassDeviceSets: - type: array - nullable: true - items: - type: object - properties: - name: - type: string - count: - type: integer - format: int32 - portable: - type: boolean - tuneDeviceClass: - type: boolean - tuneFastDeviceClass: - type: boolean - encrypted: - type: boolean - schedulerName: - type: string - config: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - placement: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - preparePlacement: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - resources: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - volumeClaimTemplates: - type: array - items: - type: object - x-kubernetes-preserve-unknown-fields: true - monitoring: - type: object - properties: - enabled: - type: boolean - rulesNamespace: - type: string - externalMgrEndpoints: - type: array - items: - type: object - properties: - ip: - type: string - externalMgrPrometheusPort: - type: integer - minimum: 0 - maximum: 65535 - removeOSDsIfOutAndSafeToRemove: - type: boolean - external: - type: object - properties: - enable: - type: boolean - cleanupPolicy: - type: object - properties: - allowUninstallWithVolumes: - type: boolean - confirmation: - type: string - pattern: ^$|^yes-really-destroy-data$ - sanitizeDisks: - type: object - properties: - method: - type: string - pattern: ^(complete|quick)$ - dataSource: - type: string - pattern: ^(zero|random)$ - iteration: - type: integer - format: int32 - logCollector: - type: object - properties: - enabled: - type: boolean - periodicity: - type: string - annotations: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - placement: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - labels: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - resources: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - healthCheck: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - priorityClassNames: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - status: - type: object - x-kubernetes-preserve-unknown-fields: true - additionalPrinterColumns: - - name: DataDirHostPath - type: string - description: Directory used on the K8s nodes - jsonPath: .spec.dataDirHostPath - - name: MonCount - type: string - description: Number of MONs - jsonPath: .spec.mon.count - - name: Age - type: date - jsonPath: .metadata.creationTimestamp - - name: Phase - type: string - description: Phase - jsonPath: .status.phase - - name: Message - type: string - description: Message - jsonPath: .status.message - - name: Health - type: string - description: Ceph Health - jsonPath: .status.ceph.health - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephclients.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephClient - listKind: CephClientList - plural: cephclients - singular: cephclient - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - caps: - type: object - x-kubernetes-preserve-unknown-fields: true - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephrbdmirrors.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephRBDMirror - listKind: CephRBDMirrorList - plural: cephrbdmirrors - singular: cephrbdmirror - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - count: - type: integer - minimum: 1 - maximum: 100 - peers: - type: object - properties: - secretNames: - type: array - items: - type: string - resources: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - priorityClassName: - type: string - placement: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - annotations: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephfilesystems.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystem - listKind: CephFilesystemList - plural: cephfilesystems - singular: cephfilesystem - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - metadataServer: - type: object - properties: - activeCount: - minimum: 1 - maximum: 10 - type: integer - activeStandby: - type: boolean - annotations: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - placement: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - resources: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - priorityClassName: - type: string - labels: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - metadataPool: - type: object - nullable: true - properties: - failureDomain: - type: string - deviceClass: - type: string - crushRoot: - type: string - replicated: - type: object - nullable: true - properties: - size: - minimum: 0 - maximum: 10 - type: integer - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - parameters: - type: object - x-kubernetes-preserve-unknown-fields: true - erasureCoded: - type: object - nullable: true - properties: - dataChunks: - minimum: 0 - maximum: 10 - type: integer - codingChunks: - minimum: 0 - maximum: 10 - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - dataPools: - type: array - nullable: true - items: - type: object - properties: - failureDomain: - type: string - deviceClass: - type: string - crushRoot: - type: string - replicated: - type: object - nullable: true - properties: - size: - minimum: 0 - maximum: 10 - type: integer - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - type: object - nullable: true - properties: - dataChunks: - minimum: 0 - maximum: 10 - type: integer - codingChunks: - minimum: 0 - maximum: 10 - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - preservePoolsOnDelete: - type: boolean - preserveFilesystemOnDelete: - type: boolean - status: - type: object - x-kubernetes-preserve-unknown-fields: true - additionalPrinterColumns: - - name: ActiveMDS - type: string - description: Number of desired active MDS daemons - jsonPath: .spec.metadataServer.activeCount - - name: Age - type: date - jsonPath: .metadata.creationTimestamp - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephnfses.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephNFS - listKind: CephNFSList - plural: cephnfses - singular: cephnfs - shortNames: - - nfs - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - rados: - type: object - properties: - pool: - type: string - namespace: - type: string - server: - type: object - properties: - active: - type: integer - annotations: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - placement: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - resources: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - priorityClassName: - type: string - logLevel: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephobjectstores.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStore - listKind: CephObjectStoreList - plural: cephobjectstores - singular: cephobjectstore - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - gateway: - type: object - properties: - type: - type: string - sslCertificateRef: - type: string - nullable: true - port: - type: integer - minimum: 0 - maximum: 65535 - securePort: - type: integer - minimum: 0 - maximum: 65535 - instances: - type: integer - externalRgwEndpoints: - type: array - nullable: true - items: - type: object - properties: - ip: - type: string - annotations: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - placement: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - resources: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - labels: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - priorityClassName: - type: string - metadataPool: - type: object - nullable: true - properties: - failureDomain: - type: string - deviceClass: - type: string - crushRoot: - type: string - replicated: - type: object - nullable: true - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - type: object - nullable: true - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - zone: - type: object - properties: - name: - type: string - dataPool: - type: object - nullable: true - properties: - failureDomain: - type: string - deviceClass: - type: string - crushRoot: - type: string - replicated: - type: object - nullable: true - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - type: object - nullable: true - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - x-kubernetes-preserve-unknown-fields: true - preservePoolsOnDelete: - type: boolean - healthCheck: - type: object - nullable: true - properties: - bucket: - type: object - nullable: true - properties: - enabled: - type: boolean - interval: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephobjectstoreusers.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStoreUser - listKind: CephObjectStoreUserList - plural: cephobjectstoreusers - singular: cephobjectstoreuser - shortNames: - - rcou - - objectuser - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - store: - type: string - displayName: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephobjectrealms.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectRealm - listKind: CephObjectRealmList - plural: cephobjectrealms - singular: cephobjectrealm - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - pull: - type: object - properties: - endpoint: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephobjectzonegroups.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZoneGroup - listKind: CephObjectZoneGroupList - plural: cephobjectzonegroups - singular: cephobjectzonegroup - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - realm: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephobjectzones.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZone - listKind: CephObjectZoneList - plural: cephobjectzones - singular: cephobjectzone - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - zoneGroup: - type: string - metadataPool: - type: object - nullable: true - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - type: object - nullable: true - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - type: object - nullable: true - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - dataPool: - type: object - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - type: object - nullable: true - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - type: object - nullable: true - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - preservePoolsOnDelete: - type: boolean - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephblockpools.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBlockPool - listKind: CephBlockPoolList - plural: cephblockpools - singular: cephblockpool - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - failureDomain: - type: string - deviceClass: - type: string - crushRoot: - type: string - replicated: - type: object - nullable: true - properties: - size: - type: integer - minimum: 0 - maximum: 9 - targetSizeRatio: - type: number - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - type: object - nullable: true - properties: - dataChunks: - type: integer - minimum: 0 - maximum: 9 - codingChunks: - type: integer - minimum: 0 - maximum: 9 - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - enableRBDStats: - description: - EnableRBDStats is used to enable gathering of statistics - for all RBD images in the pool - type: boolean - parameters: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - mirroring: - type: object - nullable: true - properties: - enabled: - type: boolean - mode: - type: string - enum: - - image - - pool - snapshotSchedules: - type: array - items: - type: object - nullable: true - properties: - interval: - type: string - startTime: - type: string - quotas: - type: object - nullable: true - properties: - maxBytes: - type: integer - minimum: 0 - maxObjects: - type: integer - minimum: 0 - statusCheck: - type: object - x-kubernetes-preserve-unknown-fields: true - annotations: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: volumes.rook.io -spec: - group: rook.io - names: - kind: Volume - listKind: VolumeList - plural: volumes - singular: volume - shortNames: - - rv - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - attachments: - type: array - items: - type: object - properties: - node: - type: string - podNamespace: - type: string - podName: - type: string - clusterName: - type: string - mountDir: - type: string - readOnly: - type: boolean - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: objectbuckets.objectbucket.io -spec: - group: objectbucket.io - names: - kind: ObjectBucket - listKind: ObjectBucketList - plural: objectbuckets - singular: objectbucket - shortNames: - - ob - - obs - scope: Cluster - versions: - - name: v1alpha1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - storageClassName: - type: string - endpoint: - type: object - nullable: true - properties: - bucketHost: - type: string - bucketPort: - type: integer - format: int32 - bucketName: - type: string - region: - type: string - subRegion: - type: string - additionalConfig: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - authentication: - type: object - nullable: true - items: - type: object - x-kubernetes-preserve-unknown-fields: true - additionalState: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - reclaimPolicy: - type: string - claimRef: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: objectbucketclaims.objectbucket.io -spec: - group: objectbucket.io - names: - kind: ObjectBucketClaim - listKind: ObjectBucketClaimList - plural: objectbucketclaims - singular: objectbucketclaim - shortNames: - - obc - - obcs - scope: Namespaced - versions: - - name: v1alpha1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - storageClassName: - type: string - bucketName: - type: string - generateBucketName: - type: string - additionalConfig: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - objectBucketName: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cephfilesystemmirrors.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystemMirror - listKind: CephFilesystemMirrorList - plural: cephfilesystemmirrors - singular: cephfilesystemmirror - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - resources: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - priorityClassName: - type: string - placement: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - annotations: - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - status: - type: object - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {}` + return readManifest("crds.yaml") } - return ` -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephclusters.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephCluster - listKind: CephClusterList - plural: cephclusters - singular: cephcluster - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - annotations: {} - cephVersion: - properties: - allowUnsupported: - type: boolean - image: - type: string - dashboard: - properties: - enabled: - type: boolean - urlPrefix: - type: string - port: - type: integer - minimum: 0 - maximum: 65535 - ssl: - type: boolean - dataDirHostPath: - pattern: ^/(\S+) - type: string - disruptionManagement: - properties: - machineDisruptionBudgetNamespace: - type: string - managePodBudgets: - type: boolean - osdMaintenanceTimeout: - type: integer - pgHealthCheckTimeout: - type: integer - manageMachineDisruptionBudgets: - type: boolean - skipUpgradeChecks: - type: boolean - mon: - properties: - allowMultiplePerNode: - type: boolean - count: - maximum: 9 - minimum: 0 - type: integer - volumeClaimTemplate: {} - mgr: - properties: - modules: - items: - properties: - name: - type: string - enabled: - type: boolean - network: - properties: - hostNetwork: - type: boolean - provider: - type: string - selectors: {} - storage: - properties: - disruptionManagement: - properties: - machineDisruptionBudgetNamespace: - type: string - managePodBudgets: - type: boolean - osdMaintenanceTimeout: - type: integer - pgHealthCheckTimeout: - type: integer - manageMachineDisruptionBudgets: - type: boolean - useAllNodes: - type: boolean - nodes: - items: - properties: - name: - type: string - config: - properties: - metadataDevice: - type: string - storeType: - type: string - pattern: ^(bluestore)$ - databaseSizeMB: - type: string - walSizeMB: - type: string - journalSizeMB: - type: string - osdsPerDevice: - type: string - encryptedDevice: - type: string - pattern: ^(true|false)$ - useAllDevices: - type: boolean - deviceFilter: {} - devices: - type: array - items: - properties: - name: - type: string - config: {} - resources: {} - useAllDevices: - type: boolean - deviceFilter: {} - config: {} - storageClassDeviceSets: {} - monitoring: - properties: - enabled: - type: boolean - rulesNamespace: - type: string - rbdMirroring: - properties: - workers: - type: integer - removeOSDsIfOutAndSafeToRemove: - type: boolean - external: - properties: - enable: - type: boolean - cleanupPolicy: - properties: - confirmation: - type: string - pattern: ^$|^yes-really-destroy-data$ - sanitizeDisks: - properties: - method: - type: string - pattern: ^(complete|quick)$ - dataSource: - type: string - pattern: ^(zero|random)$ - iteration: - type: integer - format: int32 - security: - properties: - kms: - properties: - connectionDetails: - type: object - tokenSecretName: - type: string - placement: {} - resources: {} - additionalPrinterColumns: - - name: DataDirHostPath - type: string - description: Directory used on the K8s nodes - JSONPath: .spec.dataDirHostPath - - name: MonCount - type: string - description: Number of MONs - JSONPath: .spec.mon.count - - name: Age - type: date - JSONPath: .metadata.creationTimestamp - - name: State - type: string - description: Current State - JSONPath: .status.state - - name: Health - type: string - description: Ceph Health - JSONPath: .status.ceph.health - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephfilesystems.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystem - listKind: CephFilesystemList - plural: cephfilesystems - singular: cephfilesystem - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - metadataServer: - properties: - activeCount: - minimum: 1 - maximum: 10 - type: integer - activeStandby: - type: boolean - annotations: {} - placement: {} - resources: {} - metadataPool: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - minimum: 0 - maximum: 10 - type: integer - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - properties: - dataChunks: - minimum: 0 - maximum: 10 - type: integer - codingChunks: - minimum: 0 - maximum: 10 - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - dataPools: - type: array - items: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - minimum: 0 - maximum: 10 - type: integer - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - properties: - dataChunks: - minimum: 0 - maximum: 10 - type: integer - codingChunks: - minimum: 0 - maximum: 10 - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - preservePoolsOnDelete: - type: boolean - preserveFilesystemOnDelete: - type: boolean - additionalPrinterColumns: - - name: ActiveMDS - type: string - description: Number of desired active MDS daemons - JSONPath: .spec.metadataServer.activeCount - - name: Age - type: date - JSONPath: .metadata.creationTimestamp - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephnfses.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephNFS - listKind: CephNFSList - plural: cephnfses - singular: cephnfs - shortNames: - - nfs - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - rados: - properties: - pool: - type: string - namespace: - type: string - server: - properties: - active: - type: integer - annotations: {} - placement: {} - resources: {} - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectstores.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStore - listKind: CephObjectStoreList - plural: cephobjectstores - singular: cephobjectstore - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - gateway: - properties: - type: - type: string - sslCertificateRef: {} - port: - type: integer - minimum: 0 - maximum: 65535 - securePort: - type: integer - minimum: 0 - maximum: 65535 - instances: - type: integer - annotations: {} - placement: {} - resources: {} - metadataPool: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - dataPool: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - preservePoolsOnDelete: - type: boolean - healthCheck: - properties: - bucket: - properties: - disabled: - type: boolean - interval: - type: string - timeout: - type: string - livenessProbe: - type: object - nullable: true - properties: - disabled: - type: boolean - subresources: - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectstoreusers.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStoreUser - listKind: CephObjectStoreUserList - plural: cephobjectstoreusers - singular: cephobjectstoreuser - shortNames: - - rcou - - objectuser - scope: Namespaced - version: v1 - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectrealms.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectRealm - listKind: CephObjectRealmList - plural: cephobjectrealms - singular: cephobjectrealm - shortNames: - - realm - - realms - scope: Namespaced - version: v1 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectzonegroups.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZoneGroup - listKind: CephObjectZoneGroupList - plural: cephobjectzonegroups - singular: cephobjectzonegroup - shortNames: - - zonegroup - - zonegroups - scope: Namespaced - version: v1 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectzones.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZone - listKind: CephObjectZoneList - plural: cephobjectzones - singular: cephobjectzone - shortNames: - - zone - - zones - scope: Namespaced - version: v1 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephblockpools.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBlockPool - listKind: CephBlockPoolList - plural: cephblockpools - singular: cephblockpool - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - type: integer - minimum: 0 - maximum: 9 - targetSizeRatio: - type: number - requireSafeReplicaSize: - type: boolean - replicasPerFailureDomain: - type: integer - subFailureDomain: - type: string - erasureCoded: - properties: - dataChunks: - type: integer - minimum: 0 - maximum: 9 - codingChunks: - type: integer - minimum: 0 - maximum: 9 - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics - for all RBD images in the pool - type: boolean - parameters: - type: object - mirrored: - properties: - enabled: - type: boolean - mode: - type: string - enum: - - image - - pool - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: volumes.rook.io -spec: - group: rook.io - names: - kind: Volume - listKind: VolumeList - plural: volumes - singular: volume - shortNames: - - rv - scope: Namespaced - version: v1alpha2 - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: objectbuckets.objectbucket.io -spec: - group: objectbucket.io - versions: - - name: v1alpha1 - served: true - storage: true - names: - kind: ObjectBucket - listKind: ObjectBucketList - plural: objectbuckets - singular: objectbucket - shortNames: - - ob - - obs - scope: Cluster - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: objectbucketclaims.objectbucket.io -spec: - versions: - - name: v1alpha1 - served: true - storage: true - group: objectbucket.io - names: - kind: ObjectBucketClaim - listKind: ObjectBucketClaimList - plural: objectbucketclaims - singular: objectbucketclaim - shortNames: - - obc - - obcs - scope: Namespaced - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephclients.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephClient - listKind: CephClientList - plural: cephclients - singular: cephclient - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - caps: - properties: - mon: - type: string - osd: - type: string - mds: - type: string - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephrbdmirrors.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephRBDMirror - listKind: CephRBDMirrorList - plural: cephrbdmirrors - singular: cephrbdmirror - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - count: - type: integer - minimum: 1 - maximum: 100 - peers: - properties: - secretNames: - type: array - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephfilesystemmirrors.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystemMirror - listKind: CephFilesystemMirrorList - plural: cephfilesystemmirrors - singular: cephfilesystemmirror - scope: Namespaced - version: v1 - subresources: - status: {}` + return readManifest("pre-k8s-1.16/crds.yaml") } func getOpenshiftSCC(namespace string) string { - return `--- -kind: SecurityContextConstraints -# older versions of openshift have "apiVersion: v1" -apiVersion: security.openshift.io/v1 -metadata: - name: rook-ceph -allowPrivilegedContainer: true -allowHostNetwork: true -allowHostDirVolumePlugin: true -priority: -allowedCapabilities: [] -allowHostPorts: true -allowHostPID: true -allowHostIPC: true -readOnlyRootFilesystem: false -requiredDropCapabilities: [] -defaultAddCapabilities: [] -runAsUser: - type: RunAsAny -seLinuxContext: - type: MustRunAs -fsGroup: - type: MustRunAs -supplementalGroups: - type: RunAsAny -allowedFlexVolumes: - - driver: "ceph.rook.io/rook" - - driver: "ceph.rook.io/rook-ceph" -volumes: - - configMap - - downwardAPI - - emptyDir - - flexVolume - - hostPath - - persistentVolumeClaim - - projected - - secret -users: - # A user needs to be added for each rook service account. - # This assumes running in the default sample "rook-ceph" namespace. - # If other namespaces or service accounts are configured, they need to be updated here. - - system:serviceaccount:` + namespace + `:rook-ceph-system - - system:serviceaccount:` + namespace + `:default - - system:serviceaccount:` + namespace + `:rook-ceph-mgr - - system:serviceaccount:` + namespace + `:rook-ceph-osd ---- -kind: SecurityContextConstraints -# older versions of openshift have "apiVersion: v1" -apiVersion: security.openshift.io/v1 -metadata: - name: rook-ceph-csi -allowPrivilegedContainer: true -allowHostNetwork: true -allowHostDirVolumePlugin: true -priority: -allowedCapabilities: ['*'] -allowHostPorts: true -allowHostPID: true -allowHostIPC: true -readOnlyRootFilesystem: false -requiredDropCapabilities: [] -defaultAddCapabilities: [] -runAsUser: - type: RunAsAny -seLinuxContext: - type: RunAsAny -fsGroup: - type: RunAsAny -supplementalGroups: - type: RunAsAny -allowedFlexVolumes: - - driver: "ceph.rook.io/rook" - - driver: "ceph.rook.io/rook-ceph" -volumes: ['*'] -users: - # A user needs to be added for each rook service account. - # This assumes running in the default sample "rook-ceph" namespace. - # If other namespaces or service accounts are configured, they need to be updated here. - - system:serviceaccount:` + namespace + `:rook-csi-rbd-plugin-sa - - system:serviceaccount:` + namespace + `:rook-csi-rbd-provisioner-sa - - system:serviceaccount:` + namespace + `:rook-csi-cephfs-plugin-sa - - system:serviceaccount:` + namespace + `:rook-csi-cephfs-provisioner-sa -` + manifest := readManifest("scc.yaml") + return strings.ReplaceAll(manifest, "system:serviceaccount:rook-ceph:", fmt.Sprintf("system:serviceaccount:%s:", namespace)) } // GetRookOperator returns rook Operator manifest diff --git a/tests/framework/installer/ceph_manifests_v1.5.go b/tests/framework/installer/ceph_manifests_v1.5.go index 9458a4e80..dd775bf00 100644 --- a/tests/framework/installer/ceph_manifests_v1.5.go +++ b/tests/framework/installer/ceph_manifests_v1.5.go @@ -17,9 +17,13 @@ limitations under the License. package installer import ( + "fmt" + "io/ioutil" + "net/http" "strconv" "strings" + "github.com/pkg/errors" "github.com/rook/rook/tests/framework/utils" ) @@ -33,700 +37,28 @@ type CephManifestsV1_5 struct { imageTag string } +func readManifestFromGithub(filename string) string { + url := fmt.Sprintf("https://raw.githubusercontent.com/rook/rook/%s/cluster/examples/kubernetes/ceph/%s", Version1_5, filename) + logger.Infof("Retrieving manifest: %s", url) + // nolint:gosec G107 This is only test code and is expected to read from a url + response, err := http.Get(url) + if err != nil { + panic(errors.Wrapf(err, "failed to read manifest from %s", url)) + } + defer response.Body.Close() + + content, err := ioutil.ReadAll(response.Body) + if err != nil { + panic(errors.Wrapf(err, "failed to read content from %s", url)) + } + return string(content) +} + func (m *CephManifestsV1_5) GetRookCRDs(v1ExtensionsSupported bool) string { - return ` -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephclusters.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephCluster - listKind: CephClusterList - plural: cephclusters - singular: cephcluster - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - annotations: {} - cephVersion: - properties: - allowUnsupported: - type: boolean - image: - type: string - dashboard: - properties: - enabled: - type: boolean - urlPrefix: - type: string - port: - type: integer - minimum: 0 - maximum: 65535 - ssl: - type: boolean - dataDirHostPath: - pattern: ^/(\S+) - type: string - disruptionManagement: - properties: - machineDisruptionBudgetNamespace: - type: string - managePodBudgets: - type: boolean - osdMaintenanceTimeout: - type: integer - manageMachineDisruptionBudgets: - type: boolean - skipUpgradeChecks: - type: boolean - mon: - properties: - allowMultiplePerNode: - type: boolean - count: - maximum: 9 - minimum: 0 - type: integer - volumeClaimTemplate: {} - mgr: - properties: - modules: - items: - properties: - name: - type: string - enabled: - type: boolean - network: - properties: - hostNetwork: - type: boolean - provider: - type: string - selectors: {} - storage: - properties: - disruptionManagement: - properties: - machineDisruptionBudgetNamespace: - type: string - managePodBudgets: - type: boolean - osdMaintenanceTimeout: - type: integer - manageMachineDisruptionBudgets: - type: boolean - useAllNodes: - type: boolean - nodes: - items: - properties: - name: - type: string - config: - properties: - metadataDevice: - type: string - storeType: - type: string - pattern: ^(bluestore)$ - databaseSizeMB: - type: string - walSizeMB: - type: string - journalSizeMB: - type: string - osdsPerDevice: - type: string - encryptedDevice: - type: string - pattern: ^(true|false)$ - useAllDevices: - type: boolean - deviceFilter: {} - devices: - type: array - items: - properties: - name: - type: string - config: {} - resources: {} - type: array - useAllDevices: - type: boolean - deviceFilter: {} - config: {} - storageClassDeviceSets: {} - driveGroups: - type: array - items: - properties: - name: - type: string - spec: {} - placement: {} - required: - - name - - spec - monitoring: - properties: - enabled: - type: boolean - rulesNamespace: - type: string - rbdMirroring: - properties: - workers: - type: integer - removeOSDsIfOutAndSafeToRemove: - type: boolean - external: - properties: - enable: - type: boolean - cleanupPolicy: - properties: - confirmation: - type: string - pattern: ^$|^yes-really-destroy-data$ - sanitizeDisks: - properties: - method: - type: string - pattern: ^(complete|quick)$ - dataSource: - type: string - pattern: ^(zero|random)$ - iteration: - type: integer - format: int32 - placement: {} - resources: {} - additionalPrinterColumns: - - name: DataDirHostPath - type: string - description: Directory used on the K8s nodes - JSONPath: .spec.dataDirHostPath - - name: MonCount - type: string - description: Number of MONs - JSONPath: .spec.mon.count - - name: Age - type: date - JSONPath: .metadata.creationTimestamp - - name: State - type: string - description: Current State - JSONPath: .status.state - - name: Health - type: string - description: Ceph Health - JSONPath: .status.ceph.health - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephfilesystems.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystem - listKind: CephFilesystemList - plural: cephfilesystems - singular: cephfilesystem - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - metadataServer: - properties: - activeCount: - minimum: 1 - maximum: 10 - type: integer - activeStandby: - type: boolean - annotations: {} - placement: {} - resources: {} - metadataPool: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - minimum: 0 - maximum: 10 - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - minimum: 0 - maximum: 10 - type: integer - codingChunks: - minimum: 0 - maximum: 10 - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - dataPools: - type: array - items: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - minimum: 0 - maximum: 10 - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - minimum: 0 - maximum: 10 - type: integer - codingChunks: - minimum: 0 - maximum: 10 - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - preservePoolsOnDelete: - type: boolean - additionalPrinterColumns: - - name: ActiveMDS - type: string - description: Number of desired active MDS daemons - JSONPath: .spec.metadataServer.activeCount - - name: Age - type: date - JSONPath: .metadata.creationTimestamp - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephnfses.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephNFS - listKind: CephNFSList - plural: cephnfses - singular: cephnfs - shortNames: - - nfs - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - rados: - properties: - pool: - type: string - namespace: - type: string - server: - properties: - active: - type: integer - annotations: {} - placement: {} - resources: {} - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectstores.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStore - listKind: CephObjectStoreList - plural: cephobjectstores - singular: cephobjectstore - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - gateway: - properties: - type: - type: string - sslCertificateRef: {} - port: - type: integer - minimum: 1 - maximum: 65535 - securePort: {} - instances: - type: integer - annotations: {} - placement: {} - resources: {} - metadataPool: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - dataPool: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - type: integer - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - codingChunks: - type: integer - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - parameters: - type: object - preservePoolsOnDelete: - type: boolean - healthCheck: - properties: - bucket: - properties: - enabled: - type: boolean - interval: - type: string - subresources: - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectstoreusers.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStoreUser - listKind: CephObjectStoreUserList - plural: cephobjectstoreusers - singular: cephobjectstoreuser - shortNames: - - rcou - - objectuser - scope: Namespaced - version: v1 - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectrealms.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectRealm - listKind: CephObjectRealmList - plural: cephobjectrealms - singular: cephobjectrealm - shortNames: - - realm - - realms - scope: Namespaced - version: v1 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectzonegroups.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZoneGroup - listKind: CephObjectZoneGroupList - plural: cephobjectzonegroups - singular: cephobjectzonegroup - shortNames: - - zonegroup - - zonegroups - scope: Namespaced - version: v1 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephobjectzones.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZone - listKind: CephObjectZoneList - plural: cephobjectzones - singular: cephobjectzone - shortNames: - - zone - - zones - scope: Namespaced - version: v1 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephblockpools.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBlockPool - listKind: CephBlockPoolList - plural: cephblockpools - singular: cephblockpool - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - failureDomain: - type: string - crushRoot: - type: string - replicated: - properties: - size: - type: integer - minimum: 0 - maximum: 9 - targetSizeRatio: - type: number - requireSafeReplicaSize: - type: boolean - erasureCoded: - properties: - dataChunks: - type: integer - minimum: 0 - maximum: 9 - codingChunks: - type: integer - minimum: 0 - maximum: 9 - compressionMode: - type: string - enum: - - "" - - none - - passive - - aggressive - - force - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics - for all RBD images in the pool - type: boolean - parameters: - type: object - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: volumes.rook.io -spec: - group: rook.io - names: - kind: Volume - listKind: VolumeList - plural: volumes - singular: volume - shortNames: - - rv - scope: Namespaced - version: v1alpha2 - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: objectbuckets.objectbucket.io -spec: - group: objectbucket.io - versions: - - name: v1alpha1 - served: true - storage: true - names: - kind: ObjectBucket - listKind: ObjectBucketList - plural: objectbuckets - singular: objectbucket - shortNames: - - ob - - obs - scope: Cluster - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: objectbucketclaims.objectbucket.io -spec: - versions: - - name: v1alpha1 - served: true - storage: true - group: objectbucket.io - names: - kind: ObjectBucketClaim - listKind: ObjectBucketClaimList - plural: objectbucketclaims - singular: objectbucketclaim - shortNames: - - obc - - obcs - scope: Namespaced - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephclients.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephClient - listKind: CephClientList - plural: cephclients - singular: cephclient - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - caps: - properties: - mon: - type: string - osd: - type: string - mds: - type: string - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cephrbdmirrors.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephRBDMirror - listKind: CephRBDMirrorList - plural: cephrbdmirrors - singular: cephrbdmirror - scope: Namespaced - version: v1 - validation: - openAPIV3Schema: - properties: - spec: - properties: - count: - type: integer - minimum: 1 - maximum: 100 - subresources: - status: {}` + if v1ExtensionsSupported { + return readManifestFromGithub("crds.yaml") + } + return readManifestFromGithub("pre-k8s-1.16/crds.yaml") } // GetRookOperator returns rook Operator manifest