diff --git a/.zuul.yaml b/.zuul.yaml index 54478b2..89f0f60 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -26,7 +26,7 @@ name: k8sapp-rook-ceph-tox-py39 parent: openstack-tox-py39 description: | - Run py39 test for k8sapp_rook_ceph + Run py39 test for k8sapp_migration_rook_ceph nodeset: debian-bullseye required-projects: - starlingx/config @@ -35,18 +35,18 @@ - starlingx/utilities - starlingx/root files: - - python3-k8sapp-rook/* + -python3-k8sapp-migration-rook-ceph/* vars: python_version: 3.9 tox_envlist: py39 - tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/tox.ini tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt' - job: name: k8sapp-rook-ceph-tox-flake8 parent: tox description: | - Run flake8 test for k8sapp_rook_ceph + Run flake8 test for k8sapp_migration_rook_ceph nodeset: debian-bullseye required-projects: - starlingx/config @@ -55,17 +55,17 @@ - starlingx/utilities - starlingx/root files: - - python3-k8sapp-rook/* + -python3-k8sapp-migration-rook-ceph/* vars: tox_envlist: flake8 - tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/tox.ini tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt' - job: name: k8sapp-rook-ceph-tox-pylint parent: tox description: | - Run pylint test for k8sapp_rook_ceph + Run pylint test for k8sapp_migration_rook_ceph nodeset: debian-bullseye required-projects: - starlingx/config @@ -74,17 +74,17 @@ - starlingx/utilities - starlingx/root files: - - python3-k8sapp-rook/* + -python3-k8sapp-migration-rook-ceph/* vars: tox_envlist: pylint - tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/tox.ini tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt' - job: name: k8sapp-rook-ceph-tox-metadata parent: tox description: | - Run metadata test for k8sapp_rook_ceph + Run metadata test for k8sapp_migration_rook_ceph nodeset: debian-bullseye required-projects: - starlingx/config @@ -93,17 +93,17 @@ - starlingx/utilities - starlingx/root files: - - python3-k8sapp-rook/* + -python3-k8sapp-migration-rook-ceph/* vars: tox_envlist: metadata - tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/tox.ini tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt' - job: name: k8sapp-rook-ceph-tox-bandit parent: tox description: | - Run bandit test for k8sapp_rook_ceph + Run bandit test for k8sapp_migration_rook_ceph nodeset: debian-bullseye required-projects: - starlingx/config @@ -112,10 +112,10 @@ - starlingx/utilities - starlingx/root files: - - python3-k8sapp-rook/* + -python3-k8sapp-migration-rook-ceph/* vars: tox_envlist: bandit - tox_extra_args: -c python3-k8sapp-rook/k8sapp_rook/tox.ini + tox_extra_args: -c python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/tox.ini tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt' - job: diff --git a/debian_iso_image.inc b/debian_iso_image.inc index 48db5a4..0f35265 100644 --- a/debian_iso_image.inc +++ b/debian_iso_image.inc @@ -1,2 +1 @@ -#stx-rook-ceph -#stx-rook-ceph (not being added to the iso) \ No newline at end of file +#stx-migration-rook-ceph-helm \ No newline at end of file diff --git a/debian_pkg_dirs b/debian_pkg_dirs index ff77373..7b393c3 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,2 +1,3 @@ -python3-k8sapp-rook -stx-rook-ceph +migration-rook-ceph-helm +python3-k8sapp-migration-rook-ceph +stx-migration-rook-ceph-helm diff --git a/migration-rook-ceph-helm/debian/deb_folder/changelog b/migration-rook-ceph-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..36bf472 --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +migration-rook-ceph-helm (1.7-11) unstable; urgency=medium + + * Initial release. + + -- Caio Correa Wed, 11 Mar 2024 10:45:00 +0000 diff --git a/migration-rook-ceph-helm/debian/deb_folder/control b/migration-rook-ceph-helm/debian/deb_folder/control new file mode 100644 index 0000000..3f6f58b --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: migration-rook-ceph-helm +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + helm +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: migration-rook-ceph-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Rook-Ceph Helm Charts + This package contains helm charts for the Rook-Ceph application. \ No newline at end of file diff --git a/python3-k8sapp-rook/debian/deb_folder/copyright b/migration-rook-ceph-helm/debian/deb_folder/copyright similarity index 93% rename from python3-k8sapp-rook/debian/deb_folder/copyright rename to migration-rook-ceph-helm/debian/deb_folder/copyright index 5228cab..f8de22a 100644 --- a/python3-k8sapp-rook/debian/deb_folder/copyright +++ b/migration-rook-ceph-helm/debian/deb_folder/copyright @@ -1,9 +1,9 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: python3-k8sapp-rook +Upstream-Name: migration-rook-ceph-helm Source: https://opendev.org/starlingx/rook-ceph/ Files: * -Copyright: (c) 2013-2021 Wind River Systems, Inc +Copyright: (c) 2024 Wind River Systems, Inc License: Apache-2 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ License: Apache-2 # If you want to use GPL v2 or later for the /debian/* files use # the following clauses, or change it to suit. Delete these two lines Files: debian/* -Copyright: 2021 Wind River Systems, Inc +Copyright: 2024 Wind River Systems, Inc License: Apache-2 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/migration-rook-ceph-helm/debian/deb_folder/migration-rook-ceph-helm.install b/migration-rook-ceph-helm/debian/deb_folder/migration-rook-ceph-helm.install new file mode 100644 index 0000000..8777963 --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/migration-rook-ceph-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* \ No newline at end of file diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/0001-Removed-cephobjectstore.yaml-from-templates-folder.patch b/migration-rook-ceph-helm/debian/deb_folder/patches/0001-Removed-cephobjectstore.yaml-from-templates-folder.patch new file mode 100644 index 0000000..35b5280 --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/patches/0001-Removed-cephobjectstore.yaml-from-templates-folder.patch @@ -0,0 +1,46 @@ +From 00715f72a3ad59f74889b98c2ad5ccb9b02bcd0c Mon Sep 17 00:00:00 2001 +From: jdeolive +Date: Mon, 5 Feb 2024 14:48:56 -0300 +Subject: [PATCH] Removed cephobjectstore.yaml from templates folder. + +This patch removes objectstore from the templates thus preventing its +instalation. Its unnecessary. + +Signed-off-by: jdeolive +--- + .../templates/cephobjectstore.yaml | 23 ------------------- + 1 file changed, 23 deletions(-) + delete mode 100644 cluster/charts/rook-ceph-cluster/templates/cephobjectstore.yaml + +diff --git a/cluster/charts/rook-ceph-cluster/templates/cephobjectstore.yaml b/cluster/charts/rook-ceph-cluster/templates/cephobjectstore.yaml +deleted file mode 100644 +index 21177f32b..000000000 +--- a/cluster/charts/rook-ceph-cluster/templates/cephobjectstore.yaml ++++ /dev/null +@@ -1,23 +0,0 @@ +-{{- $root := . -}} +-{{- range $objectstore := .Values.cephObjectStores -}} +---- +-apiVersion: ceph.rook.io/v1 +-kind: CephObjectStore +-metadata: +- name: {{ $objectstore.name }} +-spec: +-{{ toYaml $objectstore.spec | indent 2 }} +---- +-{{- if default false $objectstore.storageClass.enabled }} +-apiVersion: storage.k8s.io/v1 +-kind: StorageClass +-metadata: +- name: {{ $objectstore.storageClass.name }} +-provisioner: {{ $root.Release.Namespace }}.ceph.rook.io/bucket +-reclaimPolicy: {{ default "Delete" $objectstore.storageClass.reclaimPolicy }} +-parameters: +- objectStoreName: {{ $objectstore.name }} +- objectStoreNamespace: {{ $root.Release.Namespace }} +-{{ toYaml $objectstore.storageClass.parameters | indent 2 }} +-{{ end }} +-{{ end }} +-- +2.25.1 + diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch b/migration-rook-ceph-helm/debian/deb_folder/patches/0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch new file mode 100644 index 0000000..9ba6d6d --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/patches/0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch @@ -0,0 +1,47 @@ +From 335b28d67df13d8d064fc8b654ccb7db2adf52ec Mon Sep 17 00:00:00 2001 +From: jdeolive +Date: Wed, 7 Feb 2024 15:28:22 -0300 +Subject: [PATCH] Adding the correct version to rook_ceph and rook_ceph_cluster + +Adds some versioning to the charts. Upstream charts contains the spurious +versioning numbers 0.0.1. + +Signed-off-by: jdeolive +--- + cluster/charts/rook-ceph-cluster/Chart.yaml | 4 ++-- + cluster/charts/rook-ceph/Chart.yaml | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/cluster/charts/rook-ceph-cluster/Chart.yaml b/cluster/charts/rook-ceph-cluster/Chart.yaml +index b282613cd..8e622e0f2 100644 +--- a/cluster/charts/rook-ceph-cluster/Chart.yaml ++++ b/cluster/charts/rook-ceph-cluster/Chart.yaml +@@ -1,8 +1,8 @@ + apiVersion: v2 + description: Manages a single Ceph cluster namespace for Rook + name: rook-ceph-cluster +-version: 0.0.1 +-appVersion: 0.0.1 ++version: 1.7.11 ++appVersion: 1.7.11 + icon: https://rook.io/images/rook-logo.svg + sources: + - https://github.com/rook/rook +diff --git a/cluster/charts/rook-ceph/Chart.yaml b/cluster/charts/rook-ceph/Chart.yaml +index 6b19f642b..43059e601 100644 +--- a/cluster/charts/rook-ceph/Chart.yaml ++++ b/cluster/charts/rook-ceph/Chart.yaml +@@ -1,8 +1,8 @@ + apiVersion: v2 + description: File, Block, and Object Storage Services for your Cloud-Native Environment + name: rook-ceph +-version: 0.0.1 +-appVersion: 0.0.1 ++version: 1.7.11 ++appVersion: 1.7.11 + icon: https://rook.io/images/rook-logo.svg + sources: + - https://github.com/rook/rook +-- +2.25.1 + diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/0003-Removing-unnecessary-0.patch b/migration-rook-ceph-helm/debian/deb_folder/patches/0003-Removing-unnecessary-0.patch new file mode 100644 index 0000000..2445afe --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/patches/0003-Removing-unnecessary-0.patch @@ -0,0 +1,29 @@ +From 12ce6fe529e690fc6e705a62d610679eb6b130f7 Mon Sep 17 00:00:00 2001 +From: jdeolive +Date: Wed, 7 Feb 2024 13:45:11 -0300 +Subject: [PATCH] Removing unnecessary 0 + +Removes the zero from the data pool from cephfs name to better match +the current baremetal ceph usage on Wind River systems. + +Signed-off-by: jdeolive +--- + cluster/charts/rook-ceph-cluster/templates/cephfilesystem.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cluster/charts/rook-ceph-cluster/templates/cephfilesystem.yaml b/cluster/charts/rook-ceph-cluster/templates/cephfilesystem.yaml +index d2dc1cd12..57d6c2f1a 100644 +--- a/cluster/charts/rook-ceph-cluster/templates/cephfilesystem.yaml ++++ b/cluster/charts/rook-ceph-cluster/templates/cephfilesystem.yaml +@@ -18,7 +18,7 @@ metadata: + provisioner: {{ $root.Values.operatorNamespace }}.cephfs.csi.ceph.com + parameters: + fsName: {{ $filesystem.name }} +- pool: {{ $filesystem.name }}-data0 ++ pool: {{ $filesystem.name }}-data + clusterID: {{ $root.Release.Namespace }} + {{ toYaml $filesystem.storageClass.parameters | indent 2 }} + reclaimPolicy: {{ default "Delete" $filesystem.storageClass.reclaimPolicy }} +-- +2.25.1 + diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/0004-Added-chart-for-duplex-preparation.patch b/migration-rook-ceph-helm/debian/deb_folder/patches/0004-Added-chart-for-duplex-preparation.patch new file mode 100644 index 0000000..4bfb86b --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/patches/0004-Added-chart-for-duplex-preparation.patch @@ -0,0 +1,134 @@ +From bc78e84d0814c8fbac48565946a77af980324bf2 Mon Sep 17 00:00:00 2001 +From: Caio Correa +Date: Tue, 5 Mar 2024 19:10:55 -0300 +Subject: [PATCH] Added chart for duplex preparation + +This patch adds a pre-install rook that edits the entrypoint to +rook-ceph-mon. On a duplex this entrypoint should be the floating IP +to acomplish the roaming mon strategy. + +Signed-off-by: Caio Correa +--- + .../pre-install-duplex-preparation.yaml | 82 +++++++++++++++++++ + cluster/charts/rook-ceph-cluster/values.yaml | 18 ++++ + 2 files changed, 100 insertions(+) + create mode 100644 cluster/charts/rook-ceph-cluster/templates/pre-install-duplex-preparation.yaml + +diff --git a/cluster/charts/rook-ceph-cluster/templates/pre-install-duplex-preparation.yaml b/cluster/charts/rook-ceph-cluster/templates/pre-install-duplex-preparation.yaml +new file mode 100644 +index 000000000..61e64c87b +--- /dev/null ++++ b/cluster/charts/rook-ceph-cluster/templates/pre-install-duplex-preparation.yaml +@@ -0,0 +1,82 @@ ++{{/* ++# ++# Copyright (c) 2020 Intel Corporation, Inc. ++# ++# SPDX-License-Identifier: Apache-2.0 ++# ++*/}} ++ ++{{- if .Values.hook.duplexPreparation.enable }} ++{{ $root := . }} ++--- ++apiVersion: v1 ++kind: ConfigMap ++metadata: ++ name: config-rook-ceph-duplex-preparation ++ namespace: {{ $root.Release.Namespace }} ++ annotations: ++ "helm.sh/hook": "pre-install" ++ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" ++data: ++ rook_duplex_preparation.sh: |- ++ #!/bin/bash ++ ++ cat > endpoint.yaml << EOF ++ apiVersion: v1 ++ kind: ConfigMap ++ metadata: ++ name: rook-ceph-mon-endpoints ++ namespace: $NAMESPACE ++ data: ++ data: a=$FLOAT_IP:6789 ++ mapping: '{"node":{"a":{"Name":"$ACTIVE_CONTROLLER","Hostname":"$ACTIVE_CONTROLLER","Address":"$FLOAT_IP"}}}' ++ maxMonId: "0" ++ EOF ++ ++ kubectl apply -f endpoint.yaml ++ ++ rm -f endpoint.yaml ++--- ++apiVersion: batch/v1 ++kind: Job ++metadata: ++ name: rook-ceph-duplex-preparation ++ namespace: {{ $root.Release.Namespace }} ++ labels: ++ heritage: {{$root.Release.Service | quote }} ++ release: {{$root.Release.Name | quote }} ++ chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" ++ annotations: ++ "helm.sh/hook": "pre-install" ++ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" ++spec: ++ template: ++ metadata: ++ name: rook-ceph-duplex-preparation ++ namespace: {{ $root.Release.Namespace }} ++ labels: ++ heritage: {{$root.Release.Service | quote }} ++ release: {{$root.Release.Name | quote }} ++ chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" ++ spec: ++ serviceAccountName: rook-ceph-system ++ restartPolicy: OnFailure ++ volumes: ++ - name: config-rook-ceph-duplex-preparation ++ configMap: ++ name: config-rook-ceph-duplex-preparation ++ containers: ++ - name: duplex-preparation ++ image: {{ .Values.hook.image }} ++ command: [ "/bin/bash", "/tmp/mount/rook_duplex_preparation.sh" ] ++ env: ++ - name: NAMESPACE ++ value: {{ $root.Release.Namespace }} ++ - name: ACTIVE_CONTROLLER ++ value: {{ $root.Values.hook.duplexPreparation.activeController }} ++ - name: FLOAT_IP ++ value: {{ $root.Values.hook.duplexPreparation.floatIP }} ++ volumeMounts: ++ - name: config-rook-ceph-duplex-preparation ++ mountPath: /tmp/mount ++{{- end }} +diff --git a/cluster/charts/rook-ceph-cluster/values.yaml b/cluster/charts/rook-ceph-cluster/values.yaml +index ca29c52f7..9194cbac8 100644 +--- a/cluster/charts/rook-ceph-cluster/values.yaml ++++ b/cluster/charts/rook-ceph-cluster/values.yaml +@@ -424,3 +424,21 @@ cephObjectStores: + parameters: + # note: objectStoreNamespace and objectStoreName are configured by the chart + region: us-east-1 ++ ++hook: ++ image: docker.io/openstackhelm/ceph-config-helper:ubuntu_bionic-20220802 ++ duplexPreparation: ++ enable: false ++ activeController: controller-0 ++ floatIP: 192.188.204.1 ++ cleanup: ++ enable: true ++ cluster_cleanup: rook-ceph ++ rbac: ++ clusterRole: rook-ceph-cleanup ++ clusterRoleBinding: rook-ceph-cleanup ++ role: rook-ceph-cleanup ++ roleBinding: rook-ceph-cleanup ++ serviceAccount: rook-ceph-cleanup ++ mon_hosts: ++ - controller-0 +\ No newline at end of file +-- +2.34.1 + diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/series b/migration-rook-ceph-helm/debian/deb_folder/patches/series new file mode 100644 index 0000000..8e4f358 --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/patches/series @@ -0,0 +1,4 @@ +0001-Removed-cephobjectstore.yaml-from-templates-folder.patch +0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch +0003-Removing-unnecessary-0.patch +0004-Added-chart-for-duplex-preparation.patch diff --git a/migration-rook-ceph-helm/debian/deb_folder/rules b/migration-rook-ceph-helm/debian/deb_folder/rules new file mode 100755 index 0000000..760477f --- /dev/null +++ b/migration-rook-ceph-helm/debian/deb_folder/rules @@ -0,0 +1,26 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +%: + dh $@ + +override_dh_auto_build: + +# Copy migration-rook-ceph-helm charts + mkdir -p migration-rook-ceph-helm + cp -r cluster/charts/* migration-rook-ceph-helm + cp Makefile migration-rook-ceph-helm + + cd migration-rook-ceph-helm && make rook-ceph + cd migration-rook-ceph-helm && make rook-ceph-cluster + +override_dh_auto_install: +# Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 migration-rook-ceph-helm/rook-ceph-cluster*.tgz $(APP_FOLDER) + install -p -D -m 755 migration-rook-ceph-helm/rook-ceph-[!c]*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/python3-k8sapp-rook/debian/deb_folder/source/format b/migration-rook-ceph-helm/debian/deb_folder/source/format similarity index 100% rename from python3-k8sapp-rook/debian/deb_folder/source/format rename to migration-rook-ceph-helm/debian/deb_folder/source/format diff --git a/migration-rook-ceph-helm/debian/meta_data.yaml b/migration-rook-ceph-helm/debian/meta_data.yaml new file mode 100644 index 0000000..64941f5 --- /dev/null +++ b/migration-rook-ceph-helm/debian/meta_data.yaml @@ -0,0 +1,13 @@ +--- +debname: migration-rook-ceph-helm +debver: 1.7-11 +dl_path: + name: rook-ceph-1.7.11.tar.gz + url: https://github.com/rook/rook/archive/refs/tags/v1.7.11.tar.gz + sha256sum: 0654b293618ff33608d262b5dc42b7cdb3201e29a66a9a777403856ea4c1ef48 +src_files: + - migration-rook-ceph-helm/files/Makefile +revision: + dist: $STX_DIST + GITREVCOUNT: + BASE_SRCREV: 10c623509a68acad945d4e0c06a86b3e8486ad5b diff --git a/migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile b/migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile new file mode 100644 index 0000000..3fbf4dc --- /dev/null +++ b/migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile @@ -0,0 +1,42 @@ +# +# Copyright 2017 The Openstack-Helm Authors. +# +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# It's necessary to set this because some environments don't link sh -> bash. +SHELL := /bin/bash +TASK := build + +EXCLUDES := helm-toolkit doc tests tools logs tmp +CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) + +.PHONY: $(EXCLUDES) $(CHARTS) + +all: $(CHARTS) + +$(CHARTS): + @if [ -d $@ ]; then \ + echo; \ + echo "===== Processing [$@] chart ====="; \ + make $(TASK)-$@; \ + fi + +init-%: + if [ -f $*/Makefile ]; then make -C $*; fi + +lint-%: init-% + if [ -d $* ]; then helm lint $*; fi + +build-%: lint-% + if [ -d $* ]; then helm package $*; fi + +clean: + @echo "Clean all build artifacts" + rm -f */templates/_partials.tpl */templates/_globals.tpl + rm -f *tgz */charts/*tgz + rm -rf */charts */tmpcharts + +%: + @: diff --git a/python3-k8sapp-rook/debian/deb_folder/changelog b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/changelog similarity index 60% rename from python3-k8sapp-rook/debian/deb_folder/changelog rename to python3-k8sapp-migration-rook-ceph/debian/deb_folder/changelog index b43e7b6..e4aa99d 100644 --- a/python3-k8sapp-rook/debian/deb_folder/changelog +++ b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/changelog @@ -1,4 +1,4 @@ -python3-k8sapp-rook (1.0-1) unstable; urgency=medium +python3-k8sapp-migration-rook-ceph (1.0-1) unstable; urgency=medium * Initial release. diff --git a/python3-k8sapp-rook/debian/deb_folder/control b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/control similarity index 82% rename from python3-k8sapp-rook/debian/deb_folder/control rename to python3-k8sapp-migration-rook-ceph/debian/deb_folder/control index b7b24b6..385fcf6 100644 --- a/python3-k8sapp-rook/debian/deb_folder/control +++ b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/control @@ -1,4 +1,4 @@ -Source: python3-k8sapp-rook +Source: python3-k8sapp-migration-rook-ceph Section: libs Priority: optional Maintainer: StarlingX Developers @@ -11,14 +11,14 @@ Build-Depends: debhelper-compat (= 13), Standards-Version: 4.5.1 Homepage: https://www.starlingx.io -Package: python3-k8sapp-rook +Package: python3-k8sapp-migration-rook-ceph Section: libs Architecture: any Depends: ${misc:Depends}, ${python3:Depends} Description: StarlingX Sysinv Rook Ceph Extensions Sysinv plugins for the Rook Ceph K8S app. -Package: python3-k8sapp-rook-wheels +Package: python3-k8sapp-migration-rook-ceph-wheels Section: libs Architecture: any Depends: ${misc:Depends}, ${python3:Depends}, python3-wheel diff --git a/python3-k8sapp-migration-rook-ceph/debian/deb_folder/copyright b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/copyright new file mode 100644 index 0000000..4a39bbd --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python3-k8sapp-migration-rook-ceph +Source: https://opendev.org/starlingx/rook-ceph/ + +Files: * +Copyright: (c) 2013-2024 Wind River Systems, Inc +License: Apache-2 + 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 + . + https://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. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2024 Wind River Systems, Inc +License: Apache-2 + 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 + . + https://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. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/python3-k8sapp-migration-rook-ceph-wheels.install similarity index 100% rename from python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook-wheels.install rename to python3-k8sapp-migration-rook-ceph/debian/deb_folder/python3-k8sapp-migration-rook-ceph-wheels.install diff --git a/python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/python3-k8sapp-migration-rook-ceph.install similarity index 100% rename from python3-k8sapp-rook/debian/deb_folder/python3-k8sapp-rook.install rename to python3-k8sapp-migration-rook-ceph/debian/deb_folder/python3-k8sapp-migration-rook-ceph.install diff --git a/python3-k8sapp-rook/debian/deb_folder/rules b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/rules similarity index 95% rename from python3-k8sapp-rook/debian/deb_folder/rules rename to python3-k8sapp-migration-rook-ceph/debian/deb_folder/rules index 2379738..bfb1240 100755 --- a/python3-k8sapp-rook/debian/deb_folder/rules +++ b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # export DH_VERBOSE = 1 -export APP_NAME = rook-ceph-apps +export APP_NAME = rook-ceph-migration export PYBUILD_NAME = k8sapp-rook export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') diff --git a/stx-rook-ceph/debian/deb_folder/source/format b/python3-k8sapp-migration-rook-ceph/debian/deb_folder/source/format similarity index 100% rename from stx-rook-ceph/debian/deb_folder/source/format rename to python3-k8sapp-migration-rook-ceph/debian/deb_folder/source/format diff --git a/python3-k8sapp-rook/debian/meta_data.yaml b/python3-k8sapp-migration-rook-ceph/debian/meta_data.yaml similarity index 65% rename from python3-k8sapp-rook/debian/meta_data.yaml rename to python3-k8sapp-migration-rook-ceph/debian/meta_data.yaml index 9148f26..26008db 100644 --- a/python3-k8sapp-rook/debian/meta_data.yaml +++ b/python3-k8sapp-migration-rook-ceph/debian/meta_data.yaml @@ -1,7 +1,7 @@ --- -debname: python3-k8sapp-rook +debname: python3-k8sapp-migration-rook-ceph debver: 1.0-1 -src_path: k8sapp_rook +src_path: k8sapp_migration_rook_ceph revision: dist: $STX_DIST GITREVCOUNT: diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/.coveragerc b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/.coveragerc new file mode 100644 index 0000000..1363712 --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/.coveragerc @@ -0,0 +1,7 @@ +[run] +branch = True +source = k8sapp_migration_rook_ceph +omit = k8sapp_migration_rook_ceph/tests/* + +[report] +ignore_errors = True diff --git a/python3-k8sapp-rook/k8sapp_rook/.gitignore b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/.gitignore similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/.gitignore rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/.gitignore diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/.stestr.conf b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/.stestr.conf new file mode 100644 index 0000000..1512663 --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./k8sapp_migration_rook_ceph/tests +top_dir=./k8sapp_migration_rook_ceph +#parallel_class=True diff --git a/python3-k8sapp-rook/k8sapp_rook/LICENSE b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/LICENSE similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/LICENSE rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/LICENSE diff --git a/python3-k8sapp-rook/k8sapp_rook/README.rst b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/README.rst similarity index 91% rename from python3-k8sapp-rook/k8sapp_rook/README.rst rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/README.rst index b78b635..1f109fe 100644 --- a/python3-k8sapp-rook/k8sapp_rook/README.rst +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/README.rst @@ -1,4 +1,4 @@ -k8sapp-rook-ceph +k8sapp_migration_rook_ceph ================ This project contains StarlingX Kubernetes application specific python plugins diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/__init__.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/__init__.py similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/__init__.py rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/__init__.py diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/__init__.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/common/__init__.py similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/__init__.py rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/common/__init__.py diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/common/constants.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/common/constants.py new file mode 100644 index 0000000..be994e1 --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/common/constants.py @@ -0,0 +1,34 @@ +# +# Copyright (c) 2020 Intel Corporation, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Application Name +HELM_NS_ROOK_CEPH = 'rook-ceph' +HELM_APP_ROOK_CEPH = 'rook-ceph-migration' + +# Helm: Supported charts: +# These values match the names in the chart package's Chart.yaml +HELM_CHART_ROOK_CEPH = 'rook-ceph' +HELM_CHART_ROOK_CEPH_CLUSTER = 'rook-ceph-cluster' +HELM_CHART_ROOK_CEPH_PROVISIONER = 'rook-ceph-provisioner' + +# FluxCD +FLUXCD_HELMRELEASE_ROOK_CEPH = 'rook-ceph' +FLUXCD_HELMRELEASE_ROOK_CEPH_CLUSTER = 'rook-ceph-cluster' +FLUXCD_HELMRELEASE_ROOK_CEPH_PROVISIONER = 'rook-ceph-provisioner' + +ROOK_CEPH_CLUSTER_SECRET_NAMESPACE = 'rook-ceph' + +ROOK_CEPH_RDB_SECRET_NAME = 'rook-csi-rbd-provisioner' +ROOK_CEPH_RDB_NODE_SECRET_NAME = 'rook-csi-rbd-node' + +ROOK_CEPH_FS_SECRET_NAME = 'rook-csi-cephfs-provisioner' +ROOK_CEPH_FS_NODE_SECRET_NAME = 'rook-csi-cephfs-node' + +ROOK_CEPH_CLUSTER_RDB_STORAGE_CLASS_NAME = 'general' +ROOK_CEPH_CLUSTER_CEPHFS_STORAGE_CLASS_NAME = 'cephfs' + +ROOK_CEPH_CLUSTER_CEPHFS_FILE_SYSTEM_NAME = 'kube-cephfs' diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/__init__.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/__init__.py similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/__init__.py rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/__init__.py diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph.py new file mode 100644 index 0000000..bc99ae4 --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph.py @@ -0,0 +1,43 @@ +# +# Copyright (c) 2021 Intel Corporation, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from k8sapp_migration_rook_ceph.common import constants as app_constants +from k8sapp_migration_rook_ceph.helm import storage +from sysinv.common import exception + + +class RookCephHelm(storage.StorageBaseHelm): + """Class to encapsulate helm operations for the rook-operator chart""" + CHART = app_constants.HELM_CHART_ROOK_CEPH + HELM_RELEASE = app_constants.FLUXCD_HELMRELEASE_ROOK_CEPH + + def get_overrides(self, namespace=None): + secrets = [{"name": "default-registry-key"}] + overrides = { + app_constants.HELM_NS_ROOK_CEPH: { + 'operator': self._get_operator_override(), + 'imagePullSecrets': secrets, + } + } + + if namespace in self.SUPPORTED_NAMESPACES: + return overrides[namespace] + elif namespace: + raise exception.InvalidHelmNamespace(chart=self.CHART, + namespace=namespace) + else: + return overrides + + def _get_operator_override(self): + operator = { + 'csi': { + 'enableRbdDriver': True + }, + 'enableFlexDriver': False, + 'logLevel': 'DEBUG', + } + return operator diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph_cluster.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph_cluster.py new file mode 100644 index 0000000..a6cf06e --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph_cluster.py @@ -0,0 +1,196 @@ + +# +# Copyright (c) 2018 Intel Corporation, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from k8sapp_migration_rook_ceph.common import constants as app_constants +from k8sapp_migration_rook_ceph.helm import storage + +import socket + +from sysinv.common import constants +from sysinv.common import exception +from sysinv.common import utils as cutils + + +class RookCephClusterHelm(storage.StorageBaseHelm): + """Class to encapsulate helm operations for the rook-ceph chart""" + + CHART = app_constants.HELM_CHART_ROOK_CEPH_CLUSTER + HELM_RELEASE = app_constants.FLUXCD_HELMRELEASE_ROOK_CEPH_CLUSTER + + def get_overrides(self, namespace=None): + overrides = { + app_constants.HELM_NS_ROOK_CEPH: { + 'cephClusterSpec': self._get_cluster_override(), + 'cephFileSystems': self._get_cephfs_override(), + 'cephBlockPools': self._get_rdb_override(), + 'mds': self._get_mds_override(), + 'hook': self._get_hook_override(), + } + } + + if namespace in self.SUPPORTED_NAMESPACES: + return overrides[namespace] + elif namespace: + raise exception.InvalidHelmNamespace(chart=self.CHART, + namespace=namespace) + else: + return overrides + + def _get_cephfs_override(self): + if cutils.is_aio_simplex_system(self.dbapi): + replica = 1 + else: + replica = 2 + + parameters = { + 'csi.storage.k8s.io/provisioner-secret-name': app_constants.ROOK_CEPH_FS_SECRET_NAME, + 'csi.storage.k8s.io/provisioner-secret-namespace': app_constants.ROOK_CEPH_CLUSTER_SECRET_NAMESPACE, + 'csi.storage.k8s.io/controller-expand-secret-name': app_constants.ROOK_CEPH_FS_SECRET_NAME, + 'csi.storage.k8s.io/controller-expand-secret-namespace': app_constants.ROOK_CEPH_CLUSTER_SECRET_NAMESPACE, + 'csi.storage.k8s.io/node-stage-secret-name': app_constants.ROOK_CEPH_FS_NODE_SECRET_NAME, + 'csi.storage.k8s.io/node-stage-secret-namespace': app_constants.ROOK_CEPH_CLUSTER_SECRET_NAMESPACE, + 'csi.storage.k8s.io/fstype': 'ext4' + } + + storage_class = { + 'enabled': True, + 'name': app_constants.ROOK_CEPH_CLUSTER_CEPHFS_STORAGE_CLASS_NAME, + 'isDefault': False, + 'allowVolumeExpansion': True, + 'reclaimPolicy': 'Delete', + 'parameters': parameters + } + + ceph_fs_config = [{ + 'name': app_constants.ROOK_CEPH_CLUSTER_CEPHFS_FILE_SYSTEM_NAME, + 'spec': { + 'metadataPool': { + 'replicated': + {'size': replica}}, + 'metadataServer': { + 'activeCount': 1, + 'activeStandby': True}, + 'dataPools': [{ + 'failureDomain': 'host', + 'replicated': + {'size': replica}}], + }, + 'storageClass': storage_class + }] + + return ceph_fs_config + + def _get_rdb_override(self): + if cutils.is_aio_simplex_system(self.dbapi): + replica = 1 + else: + replica = 2 + + parameters = { + 'imageFormat': '2', + 'imageFeatures': 'layering', + 'csi.storage.k8s.io/provisioner-secret-name': app_constants.ROOK_CEPH_RDB_SECRET_NAME, + 'csi.storage.k8s.io/provisioner-secret-namespace': app_constants.ROOK_CEPH_CLUSTER_SECRET_NAMESPACE, + 'csi.storage.k8s.io/controller-expand-secret-name': app_constants.ROOK_CEPH_RDB_SECRET_NAME, + 'csi.storage.k8s.io/controller-expand-secret-namespace': app_constants.ROOK_CEPH_CLUSTER_SECRET_NAMESPACE, + 'csi.storage.k8s.io/node-stage-secret-name': app_constants.ROOK_CEPH_RDB_NODE_SECRET_NAME, + 'csi.storage.k8s.io/node-stage-secret-namespace': app_constants.ROOK_CEPH_CLUSTER_SECRET_NAMESPACE, + 'csi.storage.k8s.io/fstype': 'ext4' + } + + storage_class = { + 'enabled': True, + 'name': app_constants.ROOK_CEPH_CLUSTER_RDB_STORAGE_CLASS_NAME, + 'isDefault': True, + 'allowVolumeExpansion': True, + 'reclaimPolicy': 'Delete', + 'mountOptions': [], + 'parameters': parameters + } + + rdb_config = [{ + 'name': 'kube-rbd', + 'spec': { + 'failureDomain': 'host', + 'replicated': {'size': replica} + }, + 'storageClass': storage_class + }] + + return rdb_config + + def _get_cluster_override(self): + cluster = { + 'mon': { + 'count': self._get_mon_count(), + }, + } + + return cluster + + def _get_mon_count(self): + # change it with deployment configs: + # AIO simplex/duplex have 1 mon, multi-node has 3 mons, + # 2 controllers + first mon (and cannot reconfig) + if cutils.is_aio_system(self.dbapi): + return 1 + else: + return 3 + + def _get_mds_override(self): + if cutils.is_aio_simplex_system(self.dbapi): + replica = 1 + else: + replica = 2 + + mds = { + 'replica': replica, + } + + return mds + + def _get_hook_override(self): + hook = { + 'cleanup': { + 'mon_hosts': self._get_mon_hosts(), + }, + 'duplexPreparation': self._get_duplex_preparation(), + } + return hook + + def _get_mon_hosts(self): + ceph_mon_label = "ceph-mon-placement=enabled" + mon_hosts = [] + + hosts = self.dbapi.ihost_get_list() + for h in hosts: + labels = self.dbapi.label_get_by_host(h.uuid) + for label in labels: + if (ceph_mon_label == str(label.label_key) + '=' + str(label.label_value)): + mon_hosts.append(h.hostname.encode('utf8', 'strict')) + + return mon_hosts + + def _get_duplex_preparation(self): + duplex = { + 'enable': cutils.is_aio_duplex_system(self.dbapi) + } + + if cutils.is_aio_duplex_system(self.dbapi): + hosts = self.dbapi.ihost_get_by_personality( + constants.CONTROLLER) + for host in hosts: + if host['hostname'] == socket.gethostname(): + duplex.update({'activeController': host['hostname'].encode('utf8', 'strict')}) + + pools = self.dbapi.address_pools_get_all() + for pool in pools: + if pool.name == 'management': + duplex.update({'floatIP': pool.floating_address}) + + return duplex diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph_provisioner.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph_provisioner.py similarity index 74% rename from python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph_provisioner.py rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph_provisioner.py index eda2acb..02b8335 100644 --- a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph_provisioner.py +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/rook_ceph_provisioner.py @@ -1,46 +1,28 @@ # # Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # -from k8sapp_rook.common import constants as app_constants +from k8sapp_migration_rook_ceph.common import constants as app_constants +from k8sapp_migration_rook_ceph.helm import storage + from kubernetes.client.rest import ApiException from oslo_log import log as logging from sysinv.common import constants from sysinv.common import exception from sysinv.common import kubernetes from sysinv.common import utils -from sysinv.helm import base -from sysinv.helm import common LOG = logging.getLogger(__name__) -class RookCephProvisionerHelm(base.BaseHelm): +class RookCephClusterProvisionerHelm(storage.StorageBaseHelm): """Class to encapsulate helm operations for the rook-ceph-provisioner chart""" CHART = app_constants.HELM_CHART_ROOK_CEPH_PROVISIONER - SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ - [common.HELM_NS_STORAGE_PROVISIONER] - SUPPORTED_APP_NAMESPACES = { - constants.HELM_APP_ROOK_CEPH: - base.BaseHelm.SUPPORTED_NAMESPACES + [common.HELM_NS_STORAGE_PROVISIONER], - } - - SERVICE_NAME = app_constants.HELM_CHART_ROOK_CEPH_PROVISIONER - - def execute_manifest_updates(self, operator): - # On application load this chart is enabled. Only disable if specified - # by the user - if not self._is_enabled(operator.APP, self.CHART, - common.HELM_NS_STORAGE_PROVISIONER): - operator.chart_group_chart_delete( - operator.CHART_GROUPS_LUT[self.CHART], - operator.CHARTS_LUT[self.CHART]) - - def get_namespaces(self): - return self.SUPPORTED_NAMESPACES + HELM_RELEASE = app_constants.FLUXCD_HELMRELEASE_ROOK_CEPH_PROVISIONER def get_overrides(self, namespace=None): base_name = 'ceph-pool' @@ -54,7 +36,7 @@ class RookCephProvisionerHelm(base.BaseHelm): audit = utils.is_aio_duplex_system(self.dbapi) overrides = { - common.HELM_NS_STORAGE_PROVISIONER: { + app_constants.HELM_NS_ROOK_CEPH: { "global": { "job_ceph_mon_audit": audit, }, @@ -100,7 +82,7 @@ class RookCephProvisionerHelm(base.BaseHelm): mon_ip_name = 'rook-ceph-mon-endpoints' configmap = kube.kube_read_config_map(mon_ip_name, - common.HELM_NS_STORAGE_PROVISIONER) + app_constants.HELM_NS_ROOK_CEPH) if configmap is not None: data = configmap.data['data'] LOG.info('rook configmap data is %s' % data) @@ -120,11 +102,9 @@ class RookCephProvisionerHelm(base.BaseHelm): def _is_rook_ceph(self): try: - # check function getLabels in rook/pkg/operator/ceph/cluster/mon/spec.go - # rook will assign label "mon_cluster=kube-system" to monitor pods - label = "mon_cluster=" + common.HELM_NS_STORAGE_PROVISIONER + label = "mon_cluster=" + app_constants.HELM_NS_ROOK_CEPH kube = kubernetes.KubeOperator() - pods = kube.kube_get_pods_by_selector(common.HELM_NS_STORAGE_PROVISIONER, label, "") + pods = kube.kube_get_pods_by_selector(app_constants.HELM_NS_ROOK_CEPH, label, "") if len(pods) > 0: return True except ApiException as ae: diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/storage.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/storage.py new file mode 100644 index 0000000..b484823 --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/helm/storage.py @@ -0,0 +1,53 @@ +# +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from sysinv.helm import base +from k8sapp_migration_rook_ceph.common import constants as app_constants + + +class BaseHelm(base.FluxCDBaseHelm): + """Class to encapsulate storage related service operations for helm""" + + SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ + [app_constants.HELM_NS_ROOK_CEPH] + SUPPORTED_APP_NAMESPACES = { + app_constants.HELM_APP_ROOK_CEPH: SUPPORTED_NAMESPACES, + } + + +class StorageBaseHelm(BaseHelm): + """Class to encapsulate storage service operations for helm""" + + def _is_enabled(self, app_name, chart_name, namespace): + """ + Check if the chart is enable at a system level + + :param app_name: Application name + :param chart_name: Chart supplied with the application + :param namespace: Namespace where the chart will be executed + + Returns true by default if an exception occurs as most charts are + enabled. + """ + return super(StorageBaseHelm, self)._is_enabled( + app_name, chart_name, namespace) + + def execute_kustomize_updates(self, operator): + """ + Update the elements of FluxCD kustomize manifests. + + This allows a helm chart plugin to use the FluxCDKustomizeOperator to + make dynamic structural changes to the application manifest based on the + current conditions in the platform + + Changes currenty include updates to the top level kustomize manifest to + disable helm releases. + + :param operator: an instance of the FluxCDKustomizeOperator + """ + if not self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_ROOK_CEPH): + operator.helm_release_resource_delete(self.HELM_RELEASE) diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/__init__.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/kustomize/__init__.py similarity index 88% rename from python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/__init__.py rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/kustomize/__init__.py index 9d45f6c..06516bf 100644 --- a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/__init__.py +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/kustomize/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Intel Corporation, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/kustomize/kustomize_rook_ceph.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/kustomize/kustomize_rook_ceph.py new file mode 100644 index 0000000..d922449 --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/kustomize/kustomize_rook_ceph.py @@ -0,0 +1,29 @@ +# +# Copyright (c) 2020 Intel Corporation, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# All Rights Reserved. +# + +""" System inventory Kustomization resource operator.""" + +from k8sapp_migration_rook_ceph.common import constants as app_constants +from sysinv.helm import kustomize_base as base + + +class RookCephFluxCDKustomizeOperator(base.FluxCDKustomizeOperator): + + APP = app_constants.HELM_APP_ROOK_CEPH + + def platform_mode_kustomize_updates(self, dbapi, mode): + """ Update the top-level kustomization resource list + + Make changes to the top-level kustomization resource list based on the + platform mode + + :param dbapi: DB api object + :param mode: mode to control when to update the resource list + """ + pass diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/__init__.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/lifecycle/__init__.py similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/__init__.py rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/lifecycle/__init__.py diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/lifecycle/lifecycle_rook_ceph.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/lifecycle/lifecycle_rook_ceph.py new file mode 100644 index 0000000..eecd3be --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/lifecycle/lifecycle_rook_ceph.py @@ -0,0 +1,109 @@ +# +# Copyright (c) 2021 Intel Corporation, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# All Rights Reserved. +# + +""" System inventory App lifecycle operator.""" + +from oslo_log import log as logging +from sysinv.common import constants +from sysinv.common import exception +from sysinv.common import kubernetes +from sysinv.common import utils as cutils +from sysinv.helm import lifecycle_base as base +from sysinv.helm.lifecycle_constants import LifecycleConstants +from sysinv.helm import lifecycle_utils as lifecycle_utils + +LOG = logging.getLogger(__name__) + + +class RookCephAppLifecycleOperator(base.AppLifecycleOperator): + def app_lifecycle_actions(self, context, conductor_obj, app_op, app, hook_info): + """ Perform lifecycle actions for an operation + + :param context: request context + :param conductor_obj: conductor object + :param app_op: AppOperator object + :param app: AppOperator.Application object + :param hook_info: LifecycleHookInfo object + + """ + # Fluxcd request + if hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_FLUXCD_REQUEST: + if (hook_info.operation == constants.APP_REMOVE_OP and + hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_PRE): + return self.remove_finalizers_crd() + + # Resources + if hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_RESOURCE: + if hook_info.operation == constants.APP_APPLY_OP: + if hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_PRE: + return lifecycle_utils.create_local_registry_secrets(app_op, app, hook_info) + elif (hook_info.operation == constants.APP_REMOVE_OP and + hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST): + return lifecycle_utils.delete_local_registry_secrets(app_op, app, hook_info) + + # Operation + elif hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_OPERATION: + if (hook_info.operation == constants.APP_APPLY_OP and + hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST): + return self.post_apply(context, conductor_obj, app, hook_info) + + # Use the default behaviour for other hooks + super(RookCephAppLifecycleOperator, self).app_lifecycle_actions(context, conductor_obj, app_op, app, hook_info) + + def post_apply(self, context, conductor_obj, app, hook_info): + """ Post apply actions + + :param context: request context + :param conductor_obj: conductor object + :param app: AppOperator.Application object + :param hook_info: LifecycleHookInfo object + + """ + if LifecycleConstants.EXTRA not in hook_info: + raise exception.LifecycleMissingInfo("Missing {}".format(LifecycleConstants.EXTRA)) + if LifecycleConstants.APP_APPLIED not in hook_info[LifecycleConstants.EXTRA]: + raise exception.LifecycleMissingInfo( + "Missing {} {}".format(LifecycleConstants.EXTRA, LifecycleConstants.APP_APPLIED)) + + if hook_info[LifecycleConstants.EXTRA][LifecycleConstants.APP_APPLIED]: + # apply any runtime configurations that are needed for + # rook_ceph application + conductor_obj._update_config_for_rook_ceph(context) + + def remove_finalizers_crd(self): + """ Remove finalizers from CustomResourceDefinitions (CRDs) + + This function removes finalizers from rook-ceph CRDs for application removal + operation + + """ + # Get all CRDs related to rook-ceph + cmd_crds = ["kubectl", "--kubeconfig", kubernetes.KUBERNETES_ADMIN_CONF, "get", "crd", + "-o=jsonpath='{.items[?(@.spec.group==\"ceph.rook.io\")].metadata.name}'"] + + stdout, stderr = cutils.trycmd(*cmd_crds) + if not stderr: + crds = stdout.replace("'", "").strip().split(" ") + for crd_name in crds: + # Get custom resources based on each rook-ceph CRD + cmd_instances = ["kubectl", "--kubeconfig", kubernetes.KUBERNETES_ADMIN_CONF, + "get", "-n", "rook-ceph", crd_name, "-o", "name"] + stdout, stderr = cutils.trycmd(*cmd_instances) + crd_instances = stdout.strip().split("\n") + if not stderr and crd_instances: + for crd_instance in crd_instances: + if crd_instance: + # Patch each custom resource to remove finalizers + patch_cmd = ["kubectl", "--kubeconfig", kubernetes.KUBERNETES_ADMIN_CONF, + "patch", "-n", "rook-ceph", crd_instance, "-p", + "{\"metadata\":{\"finalizers\":null}}", "--type=merge"] + stdout, stderr = cutils.trycmd(*patch_cmd) + LOG.debug("{} \n stdout: {} \n stderr: {}".format(crd_instance, stdout, stderr)) + else: + LOG.error("Error removing finalizers: {stderr}") diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/tests/__init__.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/test_plugins.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/tests/test_plugins.py similarity index 54% rename from python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/test_plugins.py rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/tests/test_plugins.py index b9c63dc..6402c57 100644 --- a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/tests/test_plugins.py +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/tests/test_plugins.py @@ -1,28 +1,25 @@ # +# Copyright (c) 2024 Wind River Systems, Inc. +# # SPDX-License-Identifier: Apache-2.0 # -from sysinv.common import constants +from k8sapp_migration_rook_ceph.common import constants as app_constants from sysinv.tests.db import base as dbbase -class K8SAppRookAppMixin(object): - app_name = constants.HELM_APP_ROOK_CEPH +class K8SAppMigrationRookAppMixin(object): + app_name = app_constants.HELM_APP_ROOK_CEPH path_name = app_name + '.tgz' def setUp(self): # pylint: disable=useless-super-delegation - super(K8SAppRookAppMixin, self).setUp() - - def test_stub(self): - # This unit test stub should be removed when real - # unit tests are added - pass + super(K8SAppMigrationRookAppMixin, self).setUp() # Test Configuration: # - Controller # - IPv6 -class K8SAppRookControllerTestCase(K8SAppRookAppMixin, +class K8SAppMigrationRookControllerTestCase(K8SAppMigrationRookAppMixin, dbbase.BaseIPv6Mixin, dbbase.ControllerHostTestCase): pass @@ -31,6 +28,6 @@ class K8SAppRookControllerTestCase(K8SAppRookAppMixin, # Test Configuration: # - AIO # - IPv4 -class K8SAppRookAIOTestCase(K8SAppRookAppMixin, +class K8SAppMigrationRookAIOTestCase(K8SAppMigrationRookAppMixin, dbbase.AIOSimplexHostTestCase): pass diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/tests/test_rook.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/tests/test_rook.py new file mode 100644 index 0000000..0aaff6b --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/k8sapp_migration_rook_ceph/tests/test_rook.py @@ -0,0 +1,274 @@ +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +from k8sapp_migration_rook_ceph.common import constants as app_constants +from k8sapp_migration_rook_ceph.tests import test_plugins + +from sysinv.db import api as dbapi + +from sysinv.tests.db import base as dbbase +from sysinv.tests.db import utils as dbutils +from sysinv.tests.helm import base + + +class RookTestCase(test_plugins.K8SAppMigrationRookAppMixin, + base.HelmTestCaseMixin): + + def setUp(self): + super(RookTestCase, self).setUp() + self.app = dbutils.create_test_app(name=app_constants.HELM_APP_ROOK_CEPH) + self.dbapi = dbapi.get_instance() + + +class RookIPv4ControllerHostTestCase(RookTestCase, + dbbase.ProvisionedControllerHostTestCase): + + def test_rook_ceph_overrides(self): + d_overrides = self.operator.get_helm_chart_overrides( + app_constants.HELM_CHART_ROOK_CEPH, + cnamespace=app_constants.HELM_NS_ROOK_CEPH) + self.assertOverridesParameters(d_overrides, { + 'operator': { + 'csi': { + 'enableRbdDriver': True + }, + 'enableFlexDriver': False, + 'logLevel': 'DEBUG'}, + 'imagePullSecrets': [ + {'name': 'default-registry-key'} + ] + }) + + def test_rook_ceph_cluster_overrides(self): + e_overrides = self.operator.get_helm_chart_overrides( + app_constants.HELM_CHART_ROOK_CEPH_CLUSTER, + cnamespace=app_constants.HELM_NS_ROOK_CEPH) + + self.assertOverridesParameters(e_overrides, { + 'cephClusterSpec': { + 'mon': { + 'count': 3 + } + }, + 'cephFileSystems': + [ + { + 'name': 'kube-cephfs', + 'spec': + { + 'metadataPool': {'replicated': {'size': 2}}, + 'metadataServer': {'activeCount': 1, 'activeStandby': True}, + 'dataPools': + [{'failureDomain': 'host', 'replicated': {'size': 2}}], + }, + 'storageClass': + { + 'enabled': True, + 'name': 'cephfs', + 'isDefault': False, + 'allowVolumeExpansion': True, + 'reclaimPolicy': 'Delete', + 'parameters': + { + 'csi.storage.k8s.io/provisioner-secret-name': 'rook-csi-cephfs-provisioner', + 'csi.storage.k8s.io/provisioner-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/controller-expand-secret-name': 'rook-csi-cephfs-provisioner', + 'csi.storage.k8s.io/controller-expand-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/node-stage-secret-name': 'rook-csi-cephfs-node', + 'csi.storage.k8s.io/node-stage-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/fstype': 'ext4', + }, + }, + }, + ], + 'cephBlockPools': + [ + { + 'name': 'kube-rbd', + 'spec': {'failureDomain': 'host', 'replicated': {'size': 2}}, + 'storageClass': + { + 'enabled': True, + 'name': 'general', + 'isDefault': True, + 'allowVolumeExpansion': True, + 'reclaimPolicy': 'Delete', + 'mountOptions': [], + 'parameters': + { + 'imageFormat': '2', + 'imageFeatures': 'layering', + 'csi.storage.k8s.io/provisioner-secret-name': 'rook-csi-rbd-provisioner', + 'csi.storage.k8s.io/provisioner-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/controller-expand-secret-name': 'rook-csi-rbd-provisioner', + 'csi.storage.k8s.io/controller-expand-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/node-stage-secret-name': 'rook-csi-rbd-node', + 'csi.storage.k8s.io/node-stage-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/fstype': 'ext4', + }, + }, + }, + ], + 'mds': {'replica': 2}, + 'hook': + { + 'cleanup': {'mon_hosts': []}, + 'duplexPreparation': {'enable': False} + } + }) + + def test_rook_ceph_provisioner_overrides(self): + f_overrides = self.operator.get_helm_chart_overrides( + app_constants.HELM_CHART_ROOK_CEPH_PROVISIONER, + cnamespace=app_constants.HELM_NS_ROOK_CEPH) + + self.assertOverridesParameters(f_overrides, { + 'global': {'job_ceph_mon_audit': False}, + 'provisionStorage': + { + 'defaultStorageClass': 'general', + 'classdefaults': + {'monitors': '', 'adminId': 'admin', 'adminSecretName': 'ceph-admin'}, + 'classes': + { + 'name': 'general', + 'pool': + { + 'pool_name': 'kube-rbd', + 'replication': 2, + 'crush_rule_name': 'storage_tier_ruleset', + 'chunk_size': 64, + }, + 'secret': + {'userId': 'kube-rbd', 'userSecretName': 'ceph-pool-kube-rbd'}, }, + }, + 'host_provision': {'controller_hosts': [b'controller-0']}, + 'ceph_audit_jobs': {}, + }) + + +class RookIPv6AIODuplexSystemTestCase(RookTestCase, + dbbase.BaseIPv6Mixin, + dbbase.ProvisionedAIODuplexSystemTestCase): + + def test_rook_ceph_overrides(self): + a_overrides = self.operator.get_helm_chart_overrides( + app_constants.HELM_CHART_ROOK_CEPH, + cnamespace=app_constants.HELM_NS_ROOK_CEPH) + + self.assertOverridesParameters(a_overrides, { + 'operator': + { + 'csi': {'enableRbdDriver': True}, + 'enableFlexDriver': False, + 'logLevel': 'DEBUG', + }, + 'imagePullSecrets': [{'name': 'default-registry-key'}], + }) + + def test_rook_ceph_cluster_overrides(self): + b_overrides = self.operator.get_helm_chart_overrides( + app_constants.HELM_CHART_ROOK_CEPH_CLUSTER, + cnamespace=app_constants.HELM_NS_ROOK_CEPH) + + self.assertOverridesParameters(b_overrides, { + 'cephClusterSpec': {'mon': {'count': 1}}, + 'cephFileSystems': + [ + { + 'name': 'kube-cephfs', + 'spec': + { + 'metadataPool': {'replicated': {'size': 2}}, + 'metadataServer': {'activeCount': 1, 'activeStandby': True}, + 'dataPools': + [{'failureDomain': 'host', 'replicated': {'size': 2}}], + }, + 'storageClass': + { + 'enabled': True, + 'name': 'cephfs', + 'isDefault': False, + 'allowVolumeExpansion': True, + 'reclaimPolicy': 'Delete', + 'parameters': + { + 'csi.storage.k8s.io/provisioner-secret-name': 'rook-csi-cephfs-provisioner', + 'csi.storage.k8s.io/provisioner-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/controller-expand-secret-name': 'rook-csi-cephfs-provisioner', + 'csi.storage.k8s.io/controller-expand-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/node-stage-secret-name': 'rook-csi-cephfs-node', + 'csi.storage.k8s.io/node-stage-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/fstype': 'ext4', + }, + }, + }, + ], + 'cephBlockPools': + [ + { + 'name': 'kube-rbd', + 'spec': {'failureDomain': 'host', 'replicated': {'size': 2}}, + 'storageClass': + { + 'enabled': True, + 'name': 'general', + 'isDefault': True, + 'allowVolumeExpansion': True, + 'reclaimPolicy': 'Delete', + 'mountOptions': [], + 'parameters': + { + 'imageFormat': '2', + 'imageFeatures': 'layering', + 'csi.storage.k8s.io/provisioner-secret-name': 'rook-csi-rbd-provisioner', + 'csi.storage.k8s.io/provisioner-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/controller-expand-secret-name': 'rook-csi-rbd-provisioner', + 'csi.storage.k8s.io/controller-expand-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/node-stage-secret-name': 'rook-csi-rbd-node', + 'csi.storage.k8s.io/node-stage-secret-namespace': 'rook-ceph', + 'csi.storage.k8s.io/fstype': 'ext4', + }, + }, + }, + ], + 'mds': {'replica': 2}, + 'hook': + { + 'cleanup': {'mon_hosts': []}, + 'duplexPreparation': {'enable': True, 'floatIP': 'fd01::2'}, + }, + }) + + def test_rook_ceph_provisioner_overrides(self): + c_overrides = self.operator.get_helm_chart_overrides( + app_constants.HELM_CHART_ROOK_CEPH_PROVISIONER, + cnamespace=app_constants.HELM_NS_ROOK_CEPH) + + self.assertOverridesParameters(c_overrides, { + 'global': {'job_ceph_mon_audit': True}, + 'provisionStorage': + { + 'defaultStorageClass': 'general', + 'classdefaults': + {'monitors': '', 'adminId': 'admin', 'adminSecretName': 'ceph-admin'}, + 'classes': + { + 'name': 'general', + 'pool': + { + 'pool_name': 'kube-rbd', + 'replication': 2, + 'crush_rule_name': 'storage_tier_ruleset', + 'chunk_size': 64, + }, + 'secret': + { + 'userId': 'kube-rbd', + 'userSecretName': 'ceph-pool-kube-rbd' + }, }, + }, + 'host_provision': {'controller_hosts': [b'controller-0', b'controller-1']}, + 'ceph_audit_jobs': {'floatIP': 'fd01::2'}, + }) diff --git a/python3-k8sapp-rook/k8sapp_rook/pylint.rc b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/pylint.rc similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/pylint.rc rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/pylint.rc diff --git a/python3-k8sapp-rook/k8sapp_rook/requirements.txt b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/requirements.txt similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/requirements.txt rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/requirements.txt diff --git a/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/setup.cfg b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/setup.cfg new file mode 100644 index 0000000..a91cd8f --- /dev/null +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/setup.cfg @@ -0,0 +1,44 @@ +[metadata] +name = k8sapp_migration_rook_ceph +summary = StarlingX sysinv extensions for rook-ceph-migration app +long_description = file: README.rst +long_description_content_type = text/x-rst +license = Apache 2.0 +author = StarlingX +author-email = starlingx-discuss@lists.starlingx.io +home-page = https://www.starlingx.io/ +classifier = + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.9 + +[files] +packages = + k8sapp_migration_rook_ceph + +[global] +setup-hooks = + pbr.hooks.setup_hook + +[entry_points] +systemconfig.helm_applications = + rook-ceph-migration = systemconfig.helm_plugins.rook_ceph_apps + +systemconfig.helm_plugins.rook_ceph_apps = + 001_rook-ceph = k8sapp_migration_rook_ceph.helm.rook_ceph:RookCephHelm + 002_rook-ceph-cluster = k8sapp_migration_rook_ceph.helm.rook_ceph_cluster:RookCephClusterHelm + 003_rook-ceph-provisioner = k8sapp_migration_rook_ceph.helm.rook_ceph_provisioner:RookCephClusterProvisionerHelm + +systemconfig.fluxcd.kustomize_ops = + rook-ceph-migration = k8sapp_migration_rook_ceph.kustomize.kustomize_rook_ceph:RookCephFluxCDKustomizeOperator + +systemconfig.app_lifecycle = + rook-ceph-migration = k8sapp_migration_rook_ceph.lifecycle.lifecycle_rook_ceph:RookCephAppLifecycleOperator + +[wheel] +universal = 1 diff --git a/python3-k8sapp-rook/k8sapp_rook/setup.py b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/setup.py similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/setup.py rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/setup.py diff --git a/python3-k8sapp-rook/k8sapp_rook/test-requirements.txt b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/test-requirements.txt similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/test-requirements.txt rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/test-requirements.txt diff --git a/python3-k8sapp-rook/k8sapp_rook/tox.ini b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/tox.ini similarity index 93% rename from python3-k8sapp-rook/k8sapp_rook/tox.ini rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/tox.ini index 1de2f92..c5ac6d9 100644 --- a/python3-k8sapp-rook/k8sapp_rook/tox.ini +++ b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/tox.ini @@ -28,11 +28,11 @@ setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 PIP_RESOLVER_DEBUG=1 PYTHONDONTWRITEBYTECODE=1 - OS_TEST_PATH=./k8sapp_rook/tests + OS_TEST_PATH=./k8sapp_migration_rook_ceph/tests LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=C - EVENTS_YAML=./k8sapp_rook/tests/events_for_testing.yaml + EVENTS_YAML=./k8sapp_migration_rook_ceph/tests/events_for_testing.yaml SYSINV_TEST_ENV=True TOX_WORK_DIR={toxworkdir} PYLINTHOME={toxworkdir} @@ -96,7 +96,7 @@ max-line-length=120 [testenv:flake8] deps = -r{toxinidir}/test-requirements.txt commands = - flake8 {posargs} ./k8sapp_rook + flake8 {posargs} ./k8sapp_migration_rook_ceph [testenv:py39] commands = @@ -145,14 +145,14 @@ exclude = tests [testenv:bandit] deps = -r{toxinidir}/test-requirements.txt -commands = bandit --ini tox.ini -n 5 -r k8sapp_rook +commands = bandit --ini tox.ini -n 5 -r k8sapp_migration_rook_ceph [testenv:pylint] install_command = pip install -v -v -v \ -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ {opts} {packages} commands = - pylint {posargs} k8sapp_rook --rcfile=./pylint.rc + pylint {posargs} k8sapp_migration_rook_ceph --rcfile=./pylint.rc [testenv:cover] # not sure is passenv is still needed @@ -177,7 +177,7 @@ commands = # of the requirements.txt files deps = pip_missing_reqs -rrequirements.txt -commands=pip-missing-reqs -d --ignore-file=/k8sapp_rook/tests k8sapp_rook +commands=pip-missing-reqs -d --ignore-file=/k8sapp_migration_rook_ceph/tests k8sapp_migration_rook_ceph [testenv:metadata] install_command = pip install -v -v -v \ @@ -185,4 +185,4 @@ install_command = pip install -v -v -v \ {opts} {packages} # Pass top level app folder to 'sysinv-app tox' command. commands = - bash -c "echo $(dirname $(dirname $(pwd))) | xargs -n 1 sysinv-app tox" \ No newline at end of file + bash -c "echo $(dirname $(dirname $(pwd))) | xargs -n 1 sysinv-app tox" diff --git a/python3-k8sapp-rook/k8sapp_rook/upper-constraints.txt b/python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/upper-constraints.txt similarity index 100% rename from python3-k8sapp-rook/k8sapp_rook/upper-constraints.txt rename to python3-k8sapp-migration-rook-ceph/k8sapp_migration_rook_ceph/upper-constraints.txt diff --git a/python3-k8sapp-rook/k8sapp_rook/.coveragerc b/python3-k8sapp-rook/k8sapp_rook/.coveragerc deleted file mode 100644 index 8e88f50..0000000 --- a/python3-k8sapp-rook/k8sapp_rook/.coveragerc +++ /dev/null @@ -1,7 +0,0 @@ -[run] -branch = True -source = k8sapp_rook -omit = k8sapp_rook/tests/* - -[report] -ignore_errors = True diff --git a/python3-k8sapp-rook/k8sapp_rook/.stestr.conf b/python3-k8sapp-rook/k8sapp_rook/.stestr.conf deleted file mode 100644 index 37400e8..0000000 --- a/python3-k8sapp-rook/k8sapp_rook/.stestr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_path=./k8sapp_rook/tests -top_dir=./k8sapp_rook -#parallel_class=True diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/constants.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/constants.py deleted file mode 100644 index f790a23..0000000 --- a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/common/constants.py +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (c) 2020 Intel Corporation, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# Helm: Supported charts: -# These values match the names in the chart package's Chart.yaml -HELM_CHART_ROOK_OPERATOR = 'rook-operator' -HELM_CHART_ROOK_CEPH = 'rook-ceph' -HELM_CHART_ROOK_CEPH_PROVISIONER = 'rook-ceph-provisioner' diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph.py deleted file mode 100644 index 3237a59..0000000 --- a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_ceph.py +++ /dev/null @@ -1,128 +0,0 @@ -# -# Copyright (c) 2018 Intel Corporation, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -from k8sapp_rook.common import constants as app_constants - -import socket - -from sysinv.common import constants -from sysinv.common import exception -from sysinv.common import utils as cutils - -from sysinv.helm import base -from sysinv.helm import common - - -class RookCephHelm(base.BaseHelm): - """Class to encapsulate helm operations for the rook-ceph chart""" - - CHART = app_constants.HELM_CHART_ROOK_CEPH - SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ - [common.HELM_NS_STORAGE_PROVISIONER] - SUPPORTED_APP_NAMESPACES = { - constants.HELM_APP_ROOK_CEPH: - base.BaseHelm.SUPPORTED_NAMESPACES + [common.HELM_NS_STORAGE_PROVISIONER], - } - - def execute_manifest_updates(self, operator): - # On application load this chart is enabled. Only disable if specified - # by the user - if not self._is_enabled(operator.APP, self.CHART, - common.HELM_NS_STORAGE_PROVISIONER): - operator.chart_group_chart_delete( - operator.CHART_GROUPS_LUT[self.CHART], - operator.CHARTS_LUT[self.CHART]) - - def get_namespaces(self): - return self.SUPPORTED_NAMESPACES - - def get_overrides(self, namespace=None): - overrides = { - common.HELM_NS_STORAGE_PROVISIONER: { - 'cluster': self._get_cluster_override(), - 'mds': self._get_mds_override(), - 'hook': self._get_hook_override(), - } - } - - if namespace in self.SUPPORTED_NAMESPACES: - return overrides[namespace] - elif namespace: - raise exception.InvalidHelmNamespace(chart=self.CHART, - namespace=namespace) - else: - return overrides - - def _get_cluster_override(self): - cluster = { - 'mon': { - 'count': self._get_mon_count(), - }, - } - - return cluster - - def _get_mon_count(self): - # change it with deployment configs: - # AIO simplex/duplex have 1 mon, multi-node has 3 mons, - # 2 controllers + first mon (and cannot reconfig) - if cutils.is_aio_system(self.dbapi): - return 1 - else: - return 3 - - def _get_mds_override(self): - if cutils.is_aio_simplex_system(self.dbapi): - replica = 1 - else: - replica = 2 - - mds = { - 'replica': replica, - } - - return mds - - def _get_hook_override(self): - hook = { - 'cleanup': { - 'mon_hosts': self._get_mon_hosts(), - }, - 'duplexPreparation': self._get_duplex_preparation(), - } - return hook - - def _get_mon_hosts(self): - ceph_mon_label = "ceph-mon-placement=enabled" - mon_hosts = [] - - hosts = self.dbapi.ihost_get_list() - for h in hosts: - labels = self.dbapi.label_get_by_host(h.uuid) - for label in labels: - if (ceph_mon_label == str(label.label_key) + '=' + str(label.label_value)): - mon_hosts.append(h.hostname.encode('utf8', 'strict')) - - return mon_hosts - - def _get_duplex_preparation(self): - duplex = { - 'enable': cutils.is_aio_duplex_system(self.dbapi) - } - - if cutils.is_aio_duplex_system(self.dbapi): - hosts = self.dbapi.ihost_get_by_personality( - constants.CONTROLLER) - for host in hosts: - if host['hostname'] == socket.gethostname(): - duplex.update({'activeController': host['hostname'].encode('utf8', 'strict')}) - - pools = self.dbapi.address_pools_get_all() - for pool in pools: - if pool.name == 'management': - duplex.update({'floatIP': pool.floating_address}) - - return duplex diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_operator.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_operator.py deleted file mode 100644 index b1ea507..0000000 --- a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/helm/rook_operator.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) 2021 Intel Corporation, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -from k8sapp_rook.common import constants as app_constants - -from sysinv.common import constants -from sysinv.common import exception - -from sysinv.helm import base -from sysinv.helm import common - - -class RookOperatorHelm(base.BaseHelm): - """Class to encapsulate helm operations for the rook-operator chart""" - - CHART = app_constants.HELM_CHART_ROOK_OPERATOR - SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ - [common.HELM_NS_STORAGE_PROVISIONER] - SUPPORTED_APP_NAMESPACES = { - constants.HELM_APP_ROOK_CEPH: - base.BaseHelm.SUPPORTED_NAMESPACES + [common.HELM_NS_STORAGE_PROVISIONER], - } - - def execute_manifest_updates(self, operator): - # On application load this chart is enabled. Only disable if specified - # by the user - if not self._is_enabled(operator.APP, self.CHART, - common.HELM_NS_STORAGE_PROVISIONER): - operator.chart_group_chart_delete( - operator.CHART_GROUPS_LUT[self.CHART], - operator.CHARTS_LUT[self.CHART]) - - def get_namespaces(self): - return self.SUPPORTED_NAMESPACES - - def get_overrides(self, namespace=None): - secrets = [{"name": "default-registry-key"}] - - overrides = { - common.HELM_NS_STORAGE_PROVISIONER: { - 'operator': self._get_operator_override(), - 'imagePullSecrets': secrets, - } - } - - if namespace in self.SUPPORTED_NAMESPACES: - return overrides[namespace] - elif namespace: - raise exception.InvalidHelmNamespace(chart=self.CHART, - namespace=namespace) - else: - return overrides - - def _get_operator_override(self): - operator = { - 'csi': { - 'enableRbdDriver': True - }, - 'enableFlexDriver': False, - 'logLevel': 'DEBUG', - } - return operator diff --git a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/lifecycle_rook_ceph.py b/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/lifecycle_rook_ceph.py deleted file mode 100644 index 4ded8f5..0000000 --- a/python3-k8sapp-rook/k8sapp_rook/k8sapp_rook/lifecycle/lifecycle_rook_ceph.py +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright (c) 2021 Intel Corporation, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -# All Rights Reserved. -# - -""" System inventory App lifecycle operator.""" -# Temporary disable pylint for lifecycle hooks -# This will be reverted in a future commit -# pylint: disable=no-member -# pylint: disable=no-name-in-module -from oslo_log import log as logging -from sysinv.common import constants -from sysinv.common import exception -from sysinv.helm import lifecycle_base as base -from sysinv.helm.lifecycle_constants import LifecycleConstants -from sysinv.helm import lifecycle_utils as lifecycle_utils - -LOG = logging.getLogger(__name__) - - -class RookCephAppLifecycleOperator(base.AppLifecycleOperator): - def app_lifecycle_actions(self, context, conductor_obj, app_op, app, hook_info): - """ Perform lifecycle actions for an operation - - :param context: request context - :param conductor_obj: conductor object - :param app_op: AppOperator object - :param app: AppOperator.Application object - :param hook_info: LifecycleHookInfo object - - """ - # Rbd - if hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_RBD: - if hook_info.operation == constants.APP_APPLY_OP and \ - hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_PRE: - return lifecycle_utils.create_rbd_provisioner_secrets(app_op, app, hook_info) - elif hook_info.operation == constants.APP_REMOVE_OP and \ - hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST: - return lifecycle_utils.delete_rbd_provisioner_secrets(app_op, app, hook_info) - - # Resources - elif hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_RESOURCE: - if hook_info.operation == constants.APP_APPLY_OP and \ - hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_PRE: - return lifecycle_utils.create_local_registry_secrets(app_op, app, hook_info) - elif hook_info.operation == constants.APP_REMOVE_OP and \ - hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST: - return lifecycle_utils.delete_local_registry_secrets(app_op, app, hook_info) - - # Operation - elif hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_OPERATION: - if hook_info.operation == constants.APP_APPLY_OP and \ - hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST: - return self.post_apply(context, conductor_obj, app, hook_info) - - # Use the default behaviour for other hooks - super(RookCephAppLifecycleOperator, self).app_lifecycle_actions(context, conductor_obj, app_op, app, hook_info) - - def post_apply(self, context, conductor_obj, app, hook_info): - """ Post apply actions - - :param context: request context - :param conductor_obj: conductor object - :param app: AppOperator.Application object - :param hook_info: LifecycleHookInfo object - - """ - if LifecycleConstants.EXTRA not in hook_info: - raise exception.LifecycleMissingInfo("Missing {}".format(LifecycleConstants.EXTRA)) - if LifecycleConstants.APP_APPLIED not in hook_info[LifecycleConstants.EXTRA]: - raise exception.LifecycleMissingInfo( - "Missing {} {}".format(LifecycleConstants.EXTRA, LifecycleConstants.APP_APPLIED)) - - if hook_info[LifecycleConstants.EXTRA][LifecycleConstants.APP_APPLIED]: - # apply any runtime configurations that are needed for - # rook_ceph application - conductor_obj._update_config_for_rook_ceph(context) diff --git a/python3-k8sapp-rook/k8sapp_rook/setup.cfg b/python3-k8sapp-rook/k8sapp_rook/setup.cfg deleted file mode 100644 index 15f45c8..0000000 --- a/python3-k8sapp-rook/k8sapp_rook/setup.cfg +++ /dev/null @@ -1,46 +0,0 @@ -[metadata] -name = k8sapp-rook -summary = StarlingX sysinv extensions for rook-ceph-apps -long_description = file: README.rst -long_description_content_type = text/x-rst -license = Apache 2.0 -author = StarlingX -author-email = starlingx-discuss@lists.starlingx.io -home-page = https://www.starlingx.io/ -classifier = - Environment :: OpenStack - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - -[files] -packages = - k8sapp_rook - -[global] -setup-hooks = - pbr.hooks.setup_hook - -[entry_points] -systemconfig.helm_applications = - rook-ceph-apps = systemconfig.helm_plugins.rook_ceph_apps - -systemconfig.helm_plugins.rook_ceph_apps = - 001_rook-operator = k8sapp_rook.helm.rook_operator:RookOperatorHelm - 002_rook-ceph = k8sapp_rook.helm.rook_ceph:RookCephHelm - 003_rook-ceph-provisioner = k8sapp_rook.helm.rook_ceph_provisioner:RookCephProvisionerHelm - -systemconfig.app_lifecycle = - rook-ceph-apps = k8sapp_rook.lifecycle.lifecycle_rook_ceph:RookCephAppLifecycleOperator - -[bdist_wheel] -universal = 1 diff --git a/stx-migration-rook-ceph-helm/debian/deb_folder/changelog b/stx-migration-rook-ceph-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..296c857 --- /dev/null +++ b/stx-migration-rook-ceph-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +stx-migration-rook-ceph-helm (2.0-1) unstable; urgency=medium + + * Initial release. + + -- Caio Cesar Correa Fri, 20 Oct 2023 15:00:00 -0300 \ No newline at end of file diff --git a/stx-rook-ceph/debian/deb_folder/control b/stx-migration-rook-ceph-helm/debian/deb_folder/control similarity index 71% rename from stx-rook-ceph/debian/deb_folder/control rename to stx-migration-rook-ceph-helm/debian/deb_folder/control index 3ade95f..7378d26 100644 --- a/stx-rook-ceph/debian/deb_folder/control +++ b/stx-migration-rook-ceph-helm/debian/deb_folder/control @@ -1,17 +1,15 @@ -Source: stx-rook-ceph +Source: stx-migration-rook-ceph-helm Section: admin Priority: optional Maintainer: StarlingX Developers Build-Depends: debhelper-compat (= 13), helm, - chartmuseum, - python3-k8sapp-rook, - python3-k8sapp-rook-wheels, - procps + migration-rook-ceph-helm, + python3-k8sapp-migration-rook-ceph-wheels, Standards-Version: 4.1.2 Homepage: https://www.starlingx.io -Package: stx-rook-ceph +Package: stx-migration-rook-ceph-helm Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: StarlingX K8S application: Rook Ceph diff --git a/stx-rook-ceph/debian/deb_folder/copyright b/stx-migration-rook-ceph-helm/debian/deb_folder/copyright similarity index 89% rename from stx-rook-ceph/debian/deb_folder/copyright rename to stx-migration-rook-ceph-helm/debian/deb_folder/copyright index a4461b5..f68acd9 100644 --- a/stx-rook-ceph/debian/deb_folder/copyright +++ b/stx-migration-rook-ceph-helm/debian/deb_folder/copyright @@ -1,10 +1,10 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: stx-rook-ceph +Upstream-Name: stx-migration-rook-ceph-helm Source: https://opendev.org/starlingx/rook-ceph/ Files: * Copyright: - (c) 2013-2021 Wind River Systems, Inc + (c) 2013-2024 Wind River Systems, Inc (c) Others (See individual files for more details) License: Apache-2 Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +25,7 @@ License: Apache-2 # If you want to use GPL v2 or later for the /debian/* files use # the following clauses, or change it to suit. Delete these two lines Files: debian/* -Copyright: 2021 Wind River Systems, Inc +Copyright: 2013-2024 Wind River Systems, Inc License: Apache-2 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/stx-migration-rook-ceph-helm/debian/deb_folder/rules b/stx-migration-rook-ceph-helm/debian/deb_folder/rules new file mode 100755 index 0000000..18ebe2f --- /dev/null +++ b/stx-migration-rook-ceph-helm/debian/deb_folder/rules @@ -0,0 +1,66 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm +export INITRD_DIR = $(ROOT)/etc/init.d + +export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +export RELEASE = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-') +export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') + +export APP_NAME = rook-ceph-migration +export APP_VERSION = $(RELEASE)-$(REVISION) +export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz + +export HELM_REPO = stx-platform +export HELM_FOLDER = /usr/lib/helm +export STAGING = staging-fluxcd + +%: + dh $@ + +override_dh_auto_build: + +# Create the TGZ file. + cd helm-charts && make rook-ceph-provisioner + +# Setup staging + mkdir -p $(STAGING) + cp files/metadata.yaml $(STAGING) + cp -Rv fluxcd-manifests $(STAGING) + + + mkdir -p $(STAGING)/charts + cp helm-charts/*.tgz $(STAGING)/charts + cp $(HELM_FOLDER)/rook-ceph*.tgz $(STAGING)/charts + +# Populate metadata + sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING)/metadata.yaml + sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING)/metadata.yaml + sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml + +# Copy the plugins: installed in the buildroot + mkdir -p $(STAGING)/plugins + cp /plugins/*.whl $(STAGING)/plugins + +# Package it up + cd $(STAGING) + find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 + tar -zcf $(APP_TARBALL_FLUXCD) -C $(STAGING)/ . + +# Cleanup staging + rm -fr $(STAGING) + +override_dh_auto_install: +# Install the app tar file + install -d -m 755 $(APP_FOLDER) + install -d -m 755 $(INITRD_DIR) + install -p -D -m 755 $(APP_TARBALL_FLUXCD) $(APP_FOLDER) + install -m 750 files/rook-mon-exit.sh $(INITRD_DIR)/rook-mon-exit + +# Prevents dh_fixperms from changing the permissions defined in this file +override_dh_fixperms: + dh_fixperms --exclude etc/init.d/rook-mon-exit + +override_dh_usrlocal: diff --git a/stx-migration-rook-ceph-helm/debian/deb_folder/source/format b/stx-migration-rook-ceph-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/stx-migration-rook-ceph-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/stx-rook-ceph/debian/deb_folder/stx-rook-ceph.install b/stx-migration-rook-ceph-helm/debian/deb_folder/stx-migration-rook-ceph-helm.install similarity index 54% rename from stx-rook-ceph/debian/deb_folder/stx-rook-ceph.install rename to stx-migration-rook-ceph-helm/debian/deb_folder/stx-migration-rook-ceph-helm.install index 7802f3d..9a6fff7 100644 --- a/stx-rook-ceph/debian/deb_folder/stx-rook-ceph.install +++ b/stx-migration-rook-ceph-helm/debian/deb_folder/stx-migration-rook-ceph-helm.install @@ -1,2 +1,2 @@ usr/local/share/applications/helm/* -etc/rc.d/init.d/rook-mon-exit +etc/init.d/rook-mon-exit diff --git a/stx-rook-ceph/debian/meta_data.yaml b/stx-migration-rook-ceph-helm/debian/meta_data.yaml similarity index 56% rename from stx-rook-ceph/debian/meta_data.yaml rename to stx-migration-rook-ceph-helm/debian/meta_data.yaml index 5616546..e7381f2 100644 --- a/stx-rook-ceph/debian/meta_data.yaml +++ b/stx-migration-rook-ceph-helm/debian/meta_data.yaml @@ -1,11 +1,10 @@ --- -debname: stx-rook-ceph -debver: 1.0-1 -src_path: stx-rook-ceph +debname: stx-migration-rook-ceph-helm +debver: 2.0-0 +src_path: stx-migration-rook-ceph-helm src_files: - files revision: dist: $STX_DIST GITREVCOUNT: - SRC_DIR: ${MY_REPO}/stx/rook-ceph BASE_SRCREV: 10c623509a68acad945d4e0c06a86b3e8486ad5b diff --git a/stx-rook-ceph/files/rook-mon-exit.sh b/stx-migration-rook-ceph-helm/files/rook-mon-exit.sh similarity index 86% rename from stx-rook-ceph/files/rook-mon-exit.sh rename to stx-migration-rook-ceph-helm/files/rook-mon-exit.sh index 7fcffd5..8bbb321 100644 --- a/stx-rook-ceph/files/rook-mon-exit.sh +++ b/stx-migration-rook-ceph-helm/files/rook-mon-exit.sh @@ -1,6 +1,7 @@ #!/bin/bash # # Copyright (c) 2020 Intel Corporation, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -21,19 +22,19 @@ function stop { pgrep ceph-mon if [ x"$?" = x"0" ]; then kubectl --kubeconfig=/etc/kubernetes/admin.conf delete \ - deployments.apps -n kube-system rook-ceph-mon-a + deployments.apps -n rook-ceph rook-ceph-mon-a kubectl --kubeconfig=/etc/kubernetes/admin.conf delete po \ - -n kube-system --selector="app=rook-ceph-mon,mon=a" + -n rook-ceph --selector="app=rook-ceph-mon,mon=a" fi pgrep ceph-osd if [ x"$?" = x"0" ]; then kubectl --kubeconfig=/etc/kubernetes/admin.conf delete \ - deployments.apps -n kube-system \ + deployments.apps -n rook-ceph \ --selector="app=rook-ceph-osd,failure-domain=$(hostname)" kubectl --kubeconfig=/etc/kubernetes/admin.conf delete po \ --selector="app=rook-ceph-osd,failure-domain=$(hostname)" \ - -n kube-system + -n rook-ceph fi } diff --git a/stx-rook-ceph/stx-rook-ceph/README b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/README similarity index 100% rename from stx-rook-ceph/stx-rook-ceph/README rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/README diff --git a/stx-rook-ceph/stx-rook-ceph/files/metadata.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/files/metadata.yaml similarity index 78% rename from stx-rook-ceph/stx-rook-ceph/files/metadata.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/files/metadata.yaml index f8d656d..b18c172 100644 --- a/stx-rook-ceph/stx-rook-ceph/files/metadata.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/files/metadata.yaml @@ -3,10 +3,14 @@ app_version: APP_REPLACE_VERSION helm_repo: HELM_REPLACE_REPO helm_toolkit_required: false +maintain_user_overrides: true +maintain_attributes: true + +upgrades: + auto_update: false behavior: - platform_managed_app: yes - desired_state: uploaded + platform_managed_app: no evaluate_reapply: triggers: - type: runtime-apply-puppet diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/helmrepository.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/helmrepository.yaml similarity index 81% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/helmrepository.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/helmrepository.yaml index 4c4adfe..a1b02dc 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/helmrepository.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/helmrepository.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/kustomization.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/kustomization.yaml similarity index 61% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/kustomization.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/kustomization.yaml index c0f37cd..6a5448f 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/kustomization.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/kustomization.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/namespace.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/namespace.yaml similarity index 55% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/namespace.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/namespace.yaml index 6726614..f9a81e3 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/base/namespace.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/base/namespace.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -7,4 +7,4 @@ apiVersion: v1 kind: Namespace metadata: - name: kube-system + name: rook-ceph diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/kustomization.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/kustomization.yaml similarity index 64% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/kustomization.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/kustomization.yaml index fc304f5..8ab908c 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/kustomization.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/kustomization.yaml @@ -1,14 +1,14 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: kube-system +namespace: rook-ceph resources: - base - rook-ceph - - rook-operator + - rook-ceph-cluster - rook-ceph-provisioner diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/helmrelease.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/helmrelease.yaml similarity index 51% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/helmrelease.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/helmrelease.yaml index f2df0e6..3549f19 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/helmrelease.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/helmrelease.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -7,20 +7,22 @@ apiVersion: "helm.toolkit.fluxcd.io/v2beta1" kind: HelmRelease metadata: - name: rook-operator + name: rook-ceph-cluster labels: chart_group: starlingx-rook-charts spec: - releaseName: rook-operator + releaseName: rook-ceph-cluster chart: spec: - chart: rook-operator - version: 0.1.0 + chart: rook-ceph-cluster + version: 1.7.11 sourceRef: kind: HelmRepository name: stx-platform interval: 5m timeout: 30m + dependsOn: + - name: rook-ceph test: enable: false install: @@ -28,11 +30,11 @@ spec: upgrade: disableHooks: false uninstall: - disableHooks: true + disableHooks: false valuesFrom: - kind: Secret - name: rook-operator-static-overrides - valuesKey: rook-operator-static-overrides.yaml + name: rook-ceph-cluster-static-overrides + valuesKey: rook-ceph-cluster-static-overrides.yaml - kind: Secret - name: rook-operator-system-overrides - valuesKey: rook-operator-system-overrides.yaml + name: rook-ceph-cluster-system-overrides + valuesKey: rook-ceph-cluster-system-overrides.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/kustomization.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/kustomization.yaml new file mode 100644 index 0000000..f9f6519 --- /dev/null +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/kustomization.yaml @@ -0,0 +1,18 @@ +# +# Copyright (c) 2022-2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +namespace: rook-ceph +resources: + - helmrelease.yaml +secretGenerator: + - name: rook-ceph-cluster-static-overrides + files: + - rook-ceph-cluster-static-overrides.yaml + - name: rook-ceph-cluster-system-overrides + files: + - rook-ceph-cluster-system-overrides.yaml +generatorOptions: + disableNameSuffixHash: true diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/rook-ceph-cluster-static-overrides.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/rook-ceph-cluster-static-overrides.yaml new file mode 100644 index 0000000..dc5e511 --- /dev/null +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/rook-ceph-cluster-static-overrides.yaml @@ -0,0 +1,242 @@ +# +# Copyright (c) 2022-2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Default values for ceph-cluster +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +configOverride: | + [global] + osd_journal_size = 1024 + osd_pool_default_size = 1 + osd_pool_default_min_size = 1 + osd_pool_default_pg_num = 64 + osd_pool_default_pgp_num = 64 + + osd_crush_chooseleaf_type = 1 + setuser match path = /var/lib/ceph/$type/$cluster-$id + mon_osd_min_down_reporters = 1 + osd_mon_report_interval_max = 120 + mon_max_pg_per_osd = 2048 + osd_max_pg_per_osd_hard_ratio = 1.2 + ms_bind_ipv6 = false + + [osd] + osd_mkfs_type = xfs + osd_mkfs_options_xfs = "-f" + osd_mount_options_xfs = "rw,noatime,inode64,logbufs=8,logbsize=256k" + + [mon] + mon warn on legacy crush tunables = false + mon pg warn max per osd = 2048 + mon pg warn max object skew = 0 + mon clock drift allowed = .1 + mon warn on pool no redundancy = false + +operatorNamespace: rook-ceph +cephClusterSpec: + dataDirHostPath: /var/lib/ceph + cephVersion: + image: quay.io/ceph/ceph:v14.2.22 + allowUnsupported: true + network: + provider: host + mon: + count: 1 + allowMultiplePerNode: false + mgr: + count: 1 + allowMultiplePerNode: false + modules: + # Several modules should not need to be included in this list. The "dashboard" and "monitoring" modules + # are already enabled by other settings in the cluster CR. + - name: pg_autoscaler + enabled: false + dashboard: + enabled: false + crashCollector: + disable: true + #deviceFilter: + healthCheck: + daemonHealth: + mon: + interval: 45s + timeout: 600s + disruptionManagement: + managePodBudgets: true + storage: + useAllNodes: false + useAllDevices: false + + placement: + all: + tolerations: + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/master + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/control-plane + mon: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: ceph-mon-placement + operator: In + values: + - enabled + mgr: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: ceph-mgr-placement + operator: In + values: + - enabled + +toolbox: + enabled: true + image: rook/ceph:v1.7.11 + +pspEnable: false + +monitoring: + # requires Prometheus to be pre-installed + # enabling will also create RBAC rules to allow Operator to create ServiceMonitors + enabled: false + + +cephFileSystems: + - name: kube-cephfs + # see https://github.com/rook/rook/blob/master/Documentation/ceph-filesystem-crd.md#filesystem-settings for available configuration + spec: + metadataPool: + replicated: + size: 1 + dataPools: + - failureDomain: host # TODO + replicated: + size: 1 + metadataServer: + activeCount: 1 + activeStandby: true + storageClass: + enabled: true + isDefault: false + name: cephfs + reclaimPolicy: Delete + allowVolumeExpansion: true + mountOptions: [] + # see https://github.com/rook/rook/blob/master/Documentation/ceph-filesystem.md#provision-storage for available configuration + parameters: + # The secrets contain Ceph admin credentials. + csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph + csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph + csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node + csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph + # Specify the filesystem type of the volume. If not specified, csi-provisioner + # will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock + # in hyperconverged settings where the volume is mounted on the same node as the osds. + csi.storage.k8s.io/fstype: ext4 + +cephBlockPools: + - name: kube-rbd + # see https://github.com/rook/rook/blob/master/Documentation/ceph-pool-crd.md#spec for available configuration + spec: + failureDomain: host + replicated: + size: 1 + storageClass: + enabled: true + name: general + isDefault: true + reclaimPolicy: Delete + allowVolumeExpansion: true + mountOptions: [] + # see https://github.com/rook/rook/blob/master/Documentation/ceph-block.md#provision-storage for available configuration + parameters: + # (optional) mapOptions is a comma-separated list of map options. + # For krbd options refer + # https://docs.ceph.com/docs/master/man/8/rbd/#kernel-rbd-krbd-options + # For nbd options refer + # https://docs.ceph.com/docs/master/man/8/rbd-nbd/#options + # mapOptions: lock_on_read,queue_depth=1024 + + # (optional) unmapOptions is a comma-separated list of unmap options. + # For krbd options refer + # https://docs.ceph.com/docs/master/man/8/rbd/#kernel-rbd-krbd-options + # For nbd options refer + # https://docs.ceph.com/docs/master/man/8/rbd-nbd/#options + # unmapOptions: force + + # RBD image format. Defaults to "2". + imageFormat: "2" + # RBD image features. Available for imageFormat: "2". CSI RBD currently supports only `layering` feature. + imageFeatures: layering + # The secrets contain Ceph admin credentials. + csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner + csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph + csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner + csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph + csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node + csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph + # Specify the filesystem type of the volume. If not specified, csi-provisioner + # will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock + # in hyperconverged settings where the volume is mounted on the same node as the osds. + csi.storage.k8s.io/fstype: ext4 + +cephObjectStores: + - name: ceph-objectstore + # see https://github.com/rook/rook/blob/master/Documentation/ceph-object-store-crd.md#object-store-settings for available configuration + spec: + metadataPool: + failureDomain: host + replicated: + size: 0 + dataPool: + failureDomain: host + erasureCoded: + dataChunks: 0 + codingChunks: 0 + preservePoolsOnDelete: false + gateway: + port: 80 + # securePort: 443 + # sslCertificateRef: + instances: 0 + healthCheck: + bucket: + interval: 60s + storageClass: + enabled: false + +mds: + name: cephfs + replica: 2 + +imagePullSecrets: + - name: default-registry-key + +hook: + image: docker.io/openstackhelm/ceph-config-helper:ubuntu_bionic-20220802 + duplexPreparation: + enable: false + activeController: controller-0 + floatIP: 192.188.204.1 + cleanup: + enable: true + cluster_cleanup: rook-ceph + rbac: + clusterRole: rook-ceph-cleanup + clusterRoleBinding: rook-ceph-cleanup + role: rook-ceph-cleanup + roleBinding: rook-ceph-cleanup + serviceAccount: rook-ceph-cleanup + mon_hosts: + - controller-0 \ No newline at end of file diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/rook-ceph-cluster-system-overrides.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/rook-ceph-cluster-system-overrides.yaml new file mode 100644 index 0000000..50908dc --- /dev/null +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-cluster/rook-ceph-cluster-system-overrides.yaml @@ -0,0 +1,6 @@ +# +# Copyright (c) 2022-2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/helmrelease.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/helmrelease.yaml similarity index 86% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/helmrelease.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/helmrelease.yaml index 12f5560..338caab 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/helmrelease.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/helmrelease.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -15,14 +15,14 @@ spec: chart: spec: chart: rook-ceph-provisioner - version: 0.1.0 + version: 1.1.0 sourceRef: kind: HelmRepository name: stx-platform interval: 5m timeout: 30m dependsOn: - - name: rook-ceph + - name: rook-ceph-cluster test: enable: false install: @@ -30,7 +30,7 @@ spec: upgrade: disableHooks: false uninstall: - disableHooks: true + disableHooks: false valuesFrom: - kind: Secret name: rook-ceph-provisioner-static-overrides diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/kustomization.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/kustomization.yaml similarity index 83% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/kustomization.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/kustomization.yaml index 10b2e3e..ac0aad7 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/kustomization.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/kustomization.yaml @@ -1,10 +1,10 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # -namespace: kube-system +namespace: rook-ceph resources: - helmrelease.yaml secretGenerator: diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-static-overrides.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-static-overrides.yaml similarity index 77% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-static-overrides.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-static-overrides.yaml index 273d37d..e1b0ca7 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-static-overrides.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-static-overrides.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -40,7 +40,7 @@ images: provisionStorage: # Defines the name of the provisioner associated with a set of storage classes - provisioner_name: kube-system.rbd.csi.ceph.com + provisioner_name: rook-ceph.rbd.csi.ceph.com # Enable this storage class as the system default storage class defaultStorageClass: rook-ceph # Configure storage classes. @@ -65,22 +65,24 @@ provisionStorage: # Ceph user name to access this pool userId: kube pool: - pool_name: kube + pool_name: kube-rbd replication: 1 crush_rule_name: storage_tier_ruleset chunk_size: 8 cephfsStorage: - provisioner_name: kube-system.cephfs.csi.ceph.com - fs_name: stxfs - pool_name: stxfs-data0 + provisioner_name: rook-ceph.cephfs.csi.ceph.com + fs_name: kube-cephfs + pool_name: kube-cephfs-data host_provision: controller_hosts: - controller-0 +imagePullSecrets: + - name: default-registry-key ceph_audit_jobs: floatIP: 192.168.204.2 @@ -90,3 +92,19 @@ ceph_audit_jobs: history: success: 1 failed: 1 +hook: + image: docker.io/openstackhelm/ceph-config-helper:ubuntu_bionic-20220802 + duplexPreparation: + enable: true + activeController: controller-0 + floatIP: 192.188.204.1 + cleanup: + enable: true + rbac: + clusterRole: rook-ceph-cleanup + clusterRoleBinding: rook-ceph-cleanup + role: rook-ceph-cleanup/ + roleBinding: rook-ceph-cleanup + serviceAccount: rook-ceph-cleanup + mon_hosts: + - controller-0 diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-system-overrides.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-system-overrides.yaml new file mode 100644 index 0000000..50908dc --- /dev/null +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-system-overrides.yaml @@ -0,0 +1,6 @@ +# +# Copyright (c) 2022-2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/README.md b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/README.md similarity index 100% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/README.md rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/README.md diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/helmrelease.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/helmrelease.yaml similarity index 87% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/helmrelease.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/helmrelease.yaml index cedb837..b81c97c 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/helmrelease.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/helmrelease.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -15,14 +15,12 @@ spec: chart: spec: chart: rook-ceph - version: 0.1.0 + version: 1.7.11 sourceRef: kind: HelmRepository name: stx-platform interval: 5m timeout: 30m - dependsOn: - - name: rook-operator test: enable: false install: diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/kustomization.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/kustomization.yaml similarity index 75% rename from stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/kustomization.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/kustomization.yaml index 0d7496e..c0a4850 100644 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/kustomization.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/kustomization.yaml @@ -1,12 +1,13 @@ # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # -namespace: kube-system +namespace: rook-ceph resources: - helmrelease.yaml + - service-account-default.yaml secretGenerator: - name: rook-ceph-static-overrides files: diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml new file mode 100644 index 0000000..93d606d --- /dev/null +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml @@ -0,0 +1,103 @@ +# +# Copyright (c) 2022-2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +image: + prefix: rook + repository: rook/ceph + tag: v1.7.11 + pullPolicy: IfNotPresent +app.starlingx.io/component: platform +nodeSelector: {node-role.kubernetes.io/control-plane : ""} + + # In some situations SELinux relabelling breaks (times out) on large filesystems, and doesn't work with cephfs ReadWriteMany volumes (last relabel wins). + # Disable it here if you have similar issues. + # For more details see https://github.com/rook/rook/issues/2417 +enableSelinuxRelabeling: true + # Writing to the hostPath is required for the Ceph mon and osd pods. Given the restricted permissions in OpenShift with SELinux, + # the pod must be running privileged in order to write to the hostPath volume, this must be set to true then. +hostpathRequiresPrivileged: false + # Disable automatic orchestration when new devices are discovered. +disableDeviceHotplug: false + # Blacklist certain disks according to the regex provided. +discoverDaemonUdev: +enableDiscoveryDaemon: false + # Tolerations for the rook-ceph-operator to allow it to run on nodes with particular taints + +pspEnable: false + +tolerations: + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule + + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule + +crds: + # Whether the helm chart should create and update the CRDs. If false, the CRDs must be + # managed independently with cluster/examples/kubernetes/ceph/crds.yaml. + # **WARNING** Only set during first deployment. If later disabled the cluster may be DESTROYED. + # If the CRDs are deleted in this case, see the disaster recovery guide to restore them. + # https://rook.github.io/docs/rook/master/ceph-disaster-recovery.html#restoring-crds-after-deletion + enabled: true + +currentNamespaceOnly: false + +resources: + limits: + cpu: 600m + memory: 512Mi + requests: + cpu: 200m + memory: 256Mi + +# imagePullSecrets option allow to pull docker images from private docker registry. Option will be passed to all service accounts. +imagePullSecrets: + - name: default-registry-key + +csi: + cephcsi: + image: quay.io/cephcsi/cephcsi:v3.4.0 + registrar: + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0 + provisioner: + image: registry.k8s.io/sig-storage/csi-provisioner:v3.5.0 + snapshotter: + image: registry.k8s.io/sig-storage/csi-snapshotter:v6.2.2 + attacher: + image: registry.k8s.io/sig-storage/csi-attacher:v4.3.0 + resizer: + image: registry.k8s.io/sig-storage/csi-resizer:v1.8.0 + +# kubeletDirPath: /var/lib/kubelet + pluginTolerations: + - operator: "Exists" + + enableRbdDriver: true + enableCephfsDriver: true + enableGrpcMetrics: true + enableSnapshotter: true + + provisionerTolerations: + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule + + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule +admissionController: + # Set tolerations and nodeAffinity for admission controller pod. + # The admission controller would be best to start on the same nodes as other ceph daemons. + tolerations: + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule + + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-system-overrides.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-system-overrides.yaml new file mode 100644 index 0000000..78c027e --- /dev/null +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/rook-ceph-system-overrides.yaml @@ -0,0 +1,6 @@ +# +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/service-account-default.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/service-account-default.yaml new file mode 100644 index 0000000..f2b4356 --- /dev/null +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/service-account-default.yaml @@ -0,0 +1,13 @@ +# +# Copyright (c) 2024 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: v1 +kind: ServiceAccount +imagePullSecrets: + - name: default-registry-key +metadata: + name: default + namespace: rook-ceph \ No newline at end of file diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/Makefile b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/Makefile similarity index 94% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/Makefile rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/Makefile index eff605d..293ca3c 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/Makefile +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/Makefile @@ -1,7 +1,7 @@ # # Copyright 2017 The Openstack-Helm Authors. # -# Copyright (c) 2019 Wind River Systems, Inc. +# Copyright (c) 2019-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/.helmignore b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/.helmignore similarity index 100% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/.helmignore rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/.helmignore diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/Chart.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/Chart.yaml similarity index 65% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/Chart.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/Chart.yaml index f810022..08b78e4 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/Chart.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/Chart.yaml @@ -1,11 +1,11 @@ # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018,2024 Wind River Systems, Inc. # Copyright (c) 2020 Intel, Inc. # # SPDX-License-Identifier: Apache-2.0 # apiVersion: v1 -appVersion: "1.0" +appVersion: "1.1" description: A Helm chart for Kubernetes name: rook-ceph-provisioner -version: 0.1.0 +version: 1.1.0 diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/requirements.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/requirements.yaml similarity index 100% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/requirements.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/requirements.yaml diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/NOTES.txt b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/NOTES.txt similarity index 100% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/NOTES.txt rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/NOTES.txt diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/_helpers.tpl b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/_helpers.tpl similarity index 99% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/_helpers.tpl rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/_helpers.tpl index b309d84..349c6e2 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/_helpers.tpl +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/_helpers.tpl @@ -117,7 +117,7 @@ def osd_audit(): kube = KubeOperator() group = "ceph.rook.io" version = "v1" - namespace = "kube-system" + namespace = "rook-ceph" plural = "cephclusters" name = "cephclusters.ceph.rook.io.ceph-cluster" diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/clusterrole.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrole.yaml similarity index 96% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/clusterrole.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrole.yaml index 5c63fb7..1ccdd6a 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/clusterrole.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrole.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/clusterrolebinding.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrolebinding.yaml similarity index 89% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/clusterrolebinding.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrolebinding.yaml index d976ce5..782f968 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/clusterrolebinding.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrolebinding.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/configmap.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/configmap.yaml similarity index 100% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/configmap.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/configmap.yaml diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml similarity index 92% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml index 93e9d77..07b9c6b 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml @@ -16,6 +16,13 @@ spec: labels: app: stx-ceph-manager spec: + tolerations: + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/master + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/control-plane dnsPolicy: ClusterFirstWithHostNet serviceAccountName: {{ .Values.rbac.serviceAccount }} volumes: diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml similarity index 87% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml index 802f4bf..9e43951 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2019 Wind River Systems, Inc. +# Copyright (c) 2019,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -29,7 +29,7 @@ data: active=$node fi - controller_node=$(kubectl get pods -n kube-system --selector=app="rook-ceph-mon,ceph_daemon_id=a" -o wide | awk '/Running.*controller/ {print $7}') + controller_node=$(kubectl get pods -n rook-ceph --selector=app="rook-ceph-mon,ceph_daemon_id=a" -o wide | awk '/Running.*controller/ {print $7}') if [ x"$active" = x"$controller_node" ]; then echo "mon-a pod is running on active controler" @@ -53,10 +53,10 @@ data: rm -f endpoint.yaml # delete mon-a deployment and pod - kubectl delete deployments.apps -n kube-system rook-ceph-mon-a - kubectl delete pods -n kube-system --selector="app=rook-ceph-mon,ceph_daemon_id=a" + kubectl delete deployments.apps -n rook-ceph rook-ceph-mon-a + kubectl delete pods -n rook-ceph --selector="app=rook-ceph-mon,ceph_daemon_id=a" - kubectl delete po -n kube-system --selector="app=rook-ceph-operator" + kubectl delete po -n rook-ceph --selector="app=rook-ceph-operator" --- apiVersion: batch/v1 kind: CronJob diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml similarity index 90% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml index 1900caf..7fc9ce1 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2019 Wind River Systems, Inc. +# Copyright (c) 2019,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -38,12 +38,19 @@ spec: labels: app: ceph-osd-audit spec: + tolerations: + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/master + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/control-plane serviceAccountName: {{ .Values.rbac.serviceAccount }} restartPolicy: OnFailure hostNetwork: true {{- if .Values.global.nodeSelector }} nodeSelector: - {{ .Values.global.nodeSelector | toYaml | trim | indent 10 }} + {{ .Values.global.nodeSelector | toYaml | trim | indent 12 }} {{- end }} volumes: - name: ceph-osd-audit-bin diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml similarity index 94% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml index aa8f17a..2fc6d80 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2018-2022 Wind River Systems, Inc. +# Copyright (c) 2018-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -62,6 +62,8 @@ data: DNS.2 = controller-1 EOF + openssl req -new -nodes -x509 -subj /O=IT/CN=controller -days 3650 -config /tmp/controller -out /tmp/controller.crt -keyout /tmp/controller.key -extensions v3_ca + # Exec_retry - wait for the cluster to create osd pools retries=25 # 4 minutes retry_count=1 @@ -80,10 +82,9 @@ data: if [ $retry_count -gt $retries ]; then echo "Error: File /tmp/controller.key was not created." - # exit 1 + exit 1 fi - openssl req -new -nodes -x509 -subj /O=IT/CN=controller -days 3650 -config /tmp/controller -out /tmp/controller.crt -keyout /tmp/controller.key -extensions v3_ca for i in "a" "controller-0" "controller-1" do @@ -117,6 +118,13 @@ spec: release: {{ .Release.Name | quote }} chart: "{{.Chart.Name}}-{{.Chart.Version}}" spec: + tolerations: + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/master + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/control-plane restartPolicy: OnFailure volumes: - name: ceph-mgr-provision-bin diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/post-install-host-provision.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-host-provision.yaml similarity index 97% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/post-install-host-provision.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-host-provision.yaml index 072b2cc..1ea0d50 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/post-install-host-provision.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-host-provision.yaml @@ -1,7 +1,7 @@ {{/* # # Copyright (c) 2020 Intel Corporation, Inc. -# Copyright (c) 2018-2022 Wind River Systems, Inc. +# Copyright (c) 2018-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/post-install-rook-provision.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-rook-provision.yaml similarity index 92% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/post-install-rook-provision.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-rook-provision.yaml index 3ff9c90..61b231c 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/post-install-rook-provision.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-rook-provision.yaml @@ -1,7 +1,7 @@ {{/* # # Copyright (c) 2020 Intel Corporation, Inc. -# Copyright (c) 2018-2022 Wind River Systems, Inc. +# Copyright (c) 2018,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -29,6 +29,8 @@ data: exit 1 fi + ceph osd pool rename kube-cephfs-data0 kube-cephfs-data + if [[ -z "${USER_ID}" && -z "${CEPH_USER_SECRET}" ]]; then echo "No need to create secrets for pool ${POOL_NAME}" exit 0 @@ -55,7 +57,7 @@ data: kubectl get configmap ceph-etc -n ${NAMESPACE} | grep ceph-etc if [ $? ]; then echo "Delete out-of-date configmap ceph-etc" - kubectl delete configmap -n kube-system ceph-etc + kubectl delete configmap -n rook-ceph ceph-etc fi kubectl create configmap ceph-etc --from-file=/etc/ceph/ceph.conf -n ${NAMESPACE} if [ $? -ne 0 ]; then @@ -67,7 +69,7 @@ data: kubectl get secret ${CEPH_ADMIN_SECRET} -n ${NAMESPACE} | grep ${CEPH_ADMIN_SECRET} if [ $? ]; then echo "Delete out-of-date ${CEPH_ADMIN_SECRET} secret" - kubectl delete secret -n kube-system ${CEPH_ADMIN_SECRET} + kubectl delete secret -n rook-ceph ${CEPH_ADMIN_SECRET} fi echo "Create ${CEPH_ADMIN_SECRET} secret" @@ -84,7 +86,7 @@ data: kubectl get secret -n ${NAMESPACE} ${CEPH_USER_SECRET} 2>/dev/null if [ $? ]; then echo "Delete out-of-date ${CEPH_USER_SECRET} secret" - kubectl delete secret -n kube-system ${CEPH_USER_SECRET} + kubectl delete secret -n rook-ceph ${CEPH_USER_SECRET} fi echo "Create ${CEPH_USER_SECRET} secret" @@ -94,6 +96,7 @@ data: exit 1 fi fi + --- apiVersion: batch/v1 kind: Job @@ -118,6 +121,13 @@ spec: release: {{$root.Release.Name | quote }} chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" spec: + tolerations: + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/master + - effect: NoSchedule + operator: Exists + key: node-role.kubernetes.io/control-plane serviceAccountName: {{ $root.Values.rbac.serviceAccount }} restartPolicy: OnFailure volumes: diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml similarity index 92% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml index 6d74c9e..c9b9957 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml @@ -1,6 +1,7 @@ {{/* # # Copyright (c) 2020 Intel Corporation, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -19,8 +20,8 @@ data: #!/bin/bash kubectl delete configmap -n ${NAMESPACE} ceph-etc - kubectl delete secret -n kube-system ${CEPH_ADMIN_SECRET} - kubectl delete secret -n kube-system ${CEPH_USER_SECRET} + kubectl delete secret -n rook-ceph ${CEPH_ADMIN_SECRET} + kubectl delete secret -n rook-ceph ${CEPH_USER_SECRET} echo "rook ceph provisioner cleanup" --- diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/role.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/role.yaml similarity index 78% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/role.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/role.yaml index 39ada44..46aef4b 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/role.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/role.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -22,4 +22,7 @@ rules: - apiGroups: [""] resources: ["namespaces"] verbs: ["get", "create", "list", "update"] +- apiGroups: ["ceph.rook.io"] + resources: ["*"] + verbs: [ "get", "list", "patch" ] {{- end}} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/rolebinding.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/rolebinding.yaml similarity index 89% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/rolebinding.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/rolebinding.yaml index a832aa8..b25e9fc 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/rolebinding.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/rolebinding.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/serviceaccount.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/serviceaccount.yaml similarity index 84% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/serviceaccount.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/serviceaccount.yaml index a839643..9f9335a 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/serviceaccount.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/serviceaccount.yaml @@ -1,6 +1,6 @@ {{/* # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/values.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/values.yaml similarity index 78% rename from stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/values.yaml rename to stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/values.yaml index 0a58e1a..33c1e43 100644 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/values.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/values.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2022 Wind River Systems, Inc. +# Copyright (c) 2018-2024 Wind River Systems, Inc. # Copyright (c) 2020 Intel Corporation, Inc # # SPDX-License-Identifier: Apache-2.0 @@ -41,7 +41,7 @@ images: provisionStorage: # Defines the name of the provisioner associated with a set of storage classes - provisioner_name: kube-system.rbd.csi.ceph.com + provisioner_name: rook-ceph.rbd.csi.ceph.com # Enable this storage class as the system default storage class defaultStorageClass: rook-ceph # Configure storage classes. @@ -73,9 +73,9 @@ provisionStorage: cephfsStorage: - provisioner_name: kube-system.cephfs.csi.ceph.com - fs_name: stxfs - pool_name: stxfs-data0 + provisioner_name: rook-ceph.cephfs.csi.ceph.com + fs_name: kube-cephfs + pool_name: kube-cephfs-data host_provision: @@ -91,3 +91,21 @@ ceph_audit_jobs: history: success: 1 failed: 1 + +hook: + image: docker.io/openstackhelm/ceph-config-helper:ubuntu_bionic-20220802 + duplexPreparation: + enable: false + activeController: controller-0 + floatIP: 192.188.204.1 + cleanup: + enable: true + cluster_cleanup: rook-ceph + rbac: + clusterRole: rook-ceph-cleanup + clusterRoleBinding: rook-ceph-cleanup + role: rook-ceph-cleanup + roleBinding: rook-ceph-cleanup + serviceAccount: rook-ceph-cleanup + mon_hosts: + - controller-0 \ No newline at end of file diff --git a/stx-rook-ceph/debian/deb_folder/changelog b/stx-rook-ceph/debian/deb_folder/changelog deleted file mode 100644 index 78277e6..0000000 --- a/stx-rook-ceph/debian/deb_folder/changelog +++ /dev/null @@ -1,5 +0,0 @@ -stx-rook-ceph (1.0-1) unstable; urgency=medium - - * Initial release. - - -- Ramon Gazoni Lacerda Tue, 30 Nov 2021 16:21:57 -0300 diff --git a/stx-rook-ceph/debian/deb_folder/rules b/stx-rook-ceph/debian/deb_folder/rules deleted file mode 100644 index ea56028..0000000 --- a/stx-rook-ceph/debian/deb_folder/rules +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/make -f -export DH_VERBOSE = 1 - -export ROOT = debian/tmp -export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm -export INITRD_DIR = $(ROOT)/etc/rc.d/init.d - -export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') -export RELEASE = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-') -export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') - -export APP_NAME = rook-ceph-apps -export APP_VERSION = $(RELEASE)-$(REVISION) -export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz - -export HELM_REPO = stx-platform -export STAGING_FLUXCD = staging-fluxcd - -%: - dh $@ - -override_dh_auto_build: - - ############ - # COMMON # - ############ -# Host a server for the helm charts. - chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="./helm-charts" & - sleep 2 - helm repo add local http://localhost:8879/charts - -# Make the charts. These produce a tgz file - cd helm-charts && \ - make rook-operator && \ - make rook-ceph && \ - make rook-ceph-provisioner - -# Terminate the helm chart server. - pkill chartmuseum - - - ############ - # FLUXCD # - ############ -# Setup staging - mkdir -p $(STAGING_FLUXCD) - cp files/metadata.yaml $(STAGING_FLUXCD) - cp -Rv fluxcd-manifests $(STAGING_FLUXCD) - mkdir -p $(STAGING_FLUXCD)/charts - cp helm-charts/*.tgz $(STAGING_FLUXCD)/charts - -# Populate metadata - sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING_FLUXCD)/metadata.yaml - sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING_FLUXCD)/metadata.yaml - sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING_FLUXCD)/metadata.yaml - -# Copy the plugins: installed in the buildroot - mkdir -p $(STAGING_FLUXCD)/plugins - cp /plugins/*.whl $(STAGING_FLUXCD)/plugins - -# Package it up - cd $(STAGING_FLUXCD) - find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 - tar -zcf $(APP_TARBALL_FLUXCD) -C $(STAGING_FLUXCD)/ . - -# Cleanup staging - rm -fr $(STAGING_FLUXCD) - -override_dh_auto_install: -# Install the app tar file - install -d -m 755 $(APP_FOLDER) - install -d -m 755 $(INITRD_DIR) - install -p -D -m 755 $(APP_TARBALL_FLUXCD) $(APP_FOLDER) - install -m 750 files/rook-mon-exit.sh $(INITRD_DIR)/rook-mon-exit - -# Prevents dh_fixperms from changing the permissions defined in this file -override_dh_fixperms: - dh_fixperms --exclude etc/rc.d/init.d/rook-mon-exit - -override_dh_usrlocal: - echo "do nothing" - diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-system-overrides.yaml b/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-system-overrides.yaml deleted file mode 100644 index 7e93270..0000000 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph-provisioner/rook-ceph-provisioner-system-overrides.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml b/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml deleted file mode 100644 index 7192b71..0000000 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/rook-ceph-static-overrides.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# Default values for ceph-cluster -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -cluster: - image: - repository: quay.io/ceph/ceph - tag: v16.2.9 - pullPolicy: IfNotPresent - # Tolerations for the ceph-cluster to allow it to run on nodes with particular taints - tolerations: [] - mon: - count: 3 - allowMultiplePerNode: false - hostNetwork: true - storage: - storeType: bluestore - databaseSizeMB: 1024 - ## Annotations to be added to pod - annotations: {} - ## LogLevel can be set to: TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR or CRITICAL - logLevel: INFO - # Writing to the hostPath is required for the Ceph mon and osd pods. Given the restricted permissions in OpenShift with SELinux, - # the pod must be running privileged in order to write to the hostPath volume, this must be set to true then. - hostpathRequiresPrivileged: false - # Disable automatic orchestration when new devices are discovered. - disableDeviceHotplug: false - - -mds: - name: stxfs - replica: 3 - - -toolbox: - image: - prefix: rook - repository: rook/ceph - tag: v1.9.6 - pullPolicy: IfNotPresent - - -hook: - image: docker.io/openstackhelm/ceph-config-helper:ubuntu_bionic-20220802 - duplexPreparation: - enable: false - activeController: controller-0 - floatIP: 192.188.204.2 - cleanup: - enable: true - rbac: - clusterRole: rook-ceph-cleanup - clusterRoleBinding: rook-ceph-cleanup - role: rook-ceph-cleanup - roleBinding: rook-ceph-cleanup - serviceAccount: rook-ceph-cleanup - mon_hosts: - - controller-0 - diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/rook-ceph-system-overrides.yaml b/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/rook-ceph-system-overrides.yaml deleted file mode 100644 index 7e93270..0000000 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-ceph/rook-ceph-system-overrides.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/kustomization.yaml b/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/kustomization.yaml deleted file mode 100644 index 5850ea1..0000000 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -namespace: kube-system -resources: - - helmrelease.yaml -secretGenerator: - - name: rook-operator-static-overrides - files: - - rook-operator-static-overrides.yaml - - name: rook-operator-system-overrides - files: - - rook-operator-system-overrides.yaml -generatorOptions: - disableNameSuffixHash: true diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/rook-operator-static-overrides.yaml b/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/rook-operator-static-overrides.yaml deleted file mode 100644 index 71fa291..0000000 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/rook-operator-static-overrides.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -operator: - image: - prefix: rook - repository: rook/ceph - tag: v1.9.6 - pullPolicy: IfNotPresent - resources: - limits: - cpu: 500m - memory: 256Mi - requests: - cpu: 100m - memory: 256Mi - # Tolerations for the rook-ceph-operator to allow it to run on nodes with particular taints - tolerations: [] - # Delay to use in node.kubernetes.io/unreachable toleration - unreachableNodeTolerationSeconds: 5 - # Whether rook watches its current namespace for CRDs or the entire cluster, defaults to false - currentNamespaceOnly: false - # Interval at which to get the ceph status and update the cluster custom resource status - cephStatusCheckInterval: "60s" - mon: - healthCheckInterval: "45s" - monOutTimeout: "600s" - ## Annotations to be added to pod - annotations: {} - ## LogLevel can be set to: TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR or CRITICAL - logLevel: INFO - ## If true, create & use RBAC resources - rbacEnable: true - ## If true, create & use PSP resources - pspEnable: false - ## Settings for whether to disable the drivers or other daemons if they are not needed - csi: - enableRbdDriver: true - enableCephfsDriver: true - enableGrpcMetrics: true - enableSnapshotter: true - - # Enable Ceph Kernel clients on kernel < 4.17. If your kernel does not support quotas for CephFS - # you may want to disable this setting. However, this will cause an issue during upgrades - # with the FUSE client. See the upgrade guide: https://rook.io/docs/rook/v1.2/ceph-upgrade.html - forceCephFSKernelClient: true - - kubeletDirPath: /var/lib/kubelet - cephcsi: - image: quay.io/cephcsi/cephcsi:v3.6.2 - registrar: - image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.4.0 - provisioner: - image: gcr.io/k8s-staging-sig-storage/csi-provisioner:v3.1.0 - snapshotter: - image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.0 - attacher: - image: k8s.gcr.io/sig-storage/csi-attacher:v3.4.0 - resizer: - image: k8s.gcr.io/sig-storage/csi-resizer:v1.4.0 - enableFlexDriver: false - enableDiscoveryDaemon: true - - # In some situations SELinux relabelling breaks (times out) on large filesystems, and doesn't work with cephfs ReadWriteMany volumes (last relabel wins). - # Disable it here if you have similar issues. - # For more details see https://github.com/rook/rook/issues/2417 - enableSelinuxRelabeling: true - # Writing to the hostPath is required for the Ceph mon and osd pods. Given the restricted permissions in OpenShift with SELinux, - # the pod must be running privileged in order to write to the hostPath volume, this must be set to true then. - hostpathRequiresPrivileged: false - # Disable automatic orchestration when new devices are discovered. - disableDeviceHotplug: false - # Blacklist certain disks according to the regex provided. - discoverDaemonUdev: - -# imagePullSecrets option allow to pull docker images from private docker registry. Option will be passed to all service accounts. -imagePullSecrets: -- name: default-registry-key - -saInit: - name: sa-init - images: - tags: - sa_init_provisioner: docker.io/openstackhelm/ceph-config-helper:ubuntu_bionic-20220802 - -cleanup: - enable: true - cluster_cleanup: ceph-cluster diff --git a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/rook-operator-system-overrides.yaml b/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/rook-operator-system-overrides.yaml deleted file mode 100644 index 7e93270..0000000 --- a/stx-rook-ceph/stx-rook-ceph/fluxcd-manifests/rook-operator/rook-operator-system-overrides.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/cephfs-storageclass.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/cephfs-storageclass.yaml deleted file mode 100644 index cceed84..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/cephfs-storageclass.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.global.cephfs_storage }} -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: rook-cephfs -provisioner: {{ .Values.cephfsStorage.provisioner_name }} -parameters: - clusterID: {{ .Release.Namespace }} - - # CephFS filesystem name into which the volume shall be created - fsName: {{ .Values.cephfsStorage.fs_name }} - # - # Ceph pool into which the volume shall be created - # Required for provisionVolume: "true" - pool: {{ .Values.cephfsStorage.pool_name }} - # - # The secrets contain Ceph admin credentials. These are generated automatically by the operator - # in the same namespace as the cluster. - csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner - csi.storage.k8s.io/provisioner-secret-namespace: {{ .Release.Namespace }} - csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner - csi.storage.k8s.io/controller-expand-secret-namespace: {{ .Release.Namespace }} - csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node - csi.storage.k8s.io/node-stage-secret-namespace: {{ .Release.Namespace }} - -reclaimPolicy: Delete -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/storageclass.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/storageclass.yaml deleted file mode 100644 index e186643..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph-provisioner/templates/storageclass.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- if .Values.global.provision_storage }} -{{ $namespace := .Release.Namespace }} -{{ $defaults := .Values.provisionStorage.classdefaults}} -{{ $provisioner := .Values.provisionStorage.provisioner_name }} -{{ $defaultSC := .Values.provisionStorage.defaultStorageClass }} -{{ $releaseGroup := .Values.release_group | default .Release.Name }} -{{ $element := .Values.provisionStorage.classes }} -apiVersion: ceph.rook.io/v1 -kind: CephBlockPool -metadata: - name: {{ $element.pool.pool_name }} - namespace: {{ $namespace }} -spec: - failureDomain: host - replicated: - size: {{ $element.pool.replication }} ---- -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: {{ $element.name }} - {{- if eq $defaultSC $element.name}} - annotations: - "storageclass.kubernetes.io/is-default-class": "true" - {{- end }} - labels: - release_group: {{ $releaseGroup }} -provisioner: {{ $provisioner }} -parameters: - # clusterID is the namespace where the rook cluster is running - # If you change this namespace, also change the namespace below where the secret namespaces are defined - clusterID: kube-system - - # Ceph pool into which the RBD image shall be created - pool: {{ $element.pool.pool_name }} - - # RBD image format. Defaults to "2". - imageFormat: "2" - - # RBD image features. Available for imageFormat: "2". CSI RBD currently supports only `layering` feature. - imageFeatures: layering - - # The secrets contain Ceph admin credentials. These are generated automatically by the operator - # in the same namespace as the cluster. - csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner - csi.storage.k8s.io/provisioner-secret-namespace: kube-system - csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node - csi.storage.k8s.io/node-stage-secret-namespace: kube-system - # Specify the filesystem type of the volume. If not specified, csi-provisioner - # will set default as `ext4`. - csi.storage.k8s.io/fstype: ext4 -# uncomment the following to use rbd-nbd as mounter on supported nodes -#mounter: rbd-nbd -reclaimPolicy: Delete -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/Chart.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/Chart.yaml deleted file mode 100644 index 6202626..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/Chart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -description: File, Block, and Object Storage Services for your Cloud-Native Environment -name: rook-ceph -version: 0.1.0 -icon: https://rook.io/images/rook-logo.svg -sources: - - https://github.com/rook/rook diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/README.md b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/README.md deleted file mode 100644 index 272e6ab..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/README.md +++ /dev/null @@ -1 +0,0 @@ -See the [Operator Helm Chart](/Documentation/helm-operator.md) documentation. diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/cluster.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/cluster.yaml deleted file mode 100644 index 03b1efd..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/cluster.yaml +++ /dev/null @@ -1,121 +0,0 @@ -apiVersion: ceph.rook.io/v1 -kind: CephCluster -metadata: - name: ceph-cluster - namespace: {{ .Release.Namespace }} -spec: - cephVersion: - image: "{{ .Values.cluster.image.repository }}:{{ .Values.cluster.image.tag }}" - allowUnsupported: false - dataDirHostPath: /var/lib/ceph - skipUpgradeChecks: false - continueUpgradeAfterChecksEvenIfNotHealthy: false - mon: - count: {{ .Values.cluster.mon.count }} - allowMultiplePerNode: {{ .Values.cluster.mon.allowMultiplePerNode }} - dashboard: - enabled: true - # urlPrefix: /ceph-dashboard - # port: 8443 - ssl: true - monitoring: - enabled: false - rulesNamespace: {{ .Release.Namespace }} - network: - hostNetwork: {{ .Values.cluster.hostNetwork }} - placement: - mon: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: ceph-mon-placement - operator: In - values: - - enabled - mgr: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: ceph-mgr-placement - operator: In - values: - - enabled - annotations: - resources: - removeOSDsIfOutAndSafeToRemove: false - storage: # cluster level storage configuration and selection - useAllNodes: false - useAllDevices: false - deviceFilter: - location: - {{ if .Values.cluster.storage.nodes }} - nodes: - {{- range $nodeConfig := .Values.cluster.storage.nodes }} - - name: {{ $nodeConfig.name }} - {{ if $nodeConfig.devices }} - devices: - {{- range $osdConfig := $nodeConfig.devices }} - - name: {{ $osdConfig.name }} - {{ if $osdConfig.config }} - config: - storeType: {{ $osdConfig.config.storeType }} - {{ if eq "$osdConfig.config.storeType" "bluestore" }} - metadataDevice: {{ $osdConfig.config.metadataDevice }} - databaseSizeMB: {{ $osdConfig.config.databaseSizeMB }} - {{ else if eq "$osdConfig.config.storeType" "filestore" }} - journalSizeMB: {{ $osdConfig.config.journalSizeMB }} - {{ end }} - {{ end }} - {{- end }} - {{ end }} - {{ if $nodeConfig.config }} - config: - storeType: {{ $nodeConfig.config.storeType }} - {{ if eq "$nodeConfig.config.storeType" "bluestore" }} - metadataDevice: {{ $nodeConfig.config.metadataDevice }} - databaseSizeMB: {{ $nodeConfig.config.databaseSizeMB }} - {{ else if eq "$nodeConfig.config.storeType" "filestore" }} - journalSizeMB: {{ $nodeConfig.config.journalSizeMB }} - {{ end }} - {{ end }} - {{ if $nodeConfig.directories }} - directories: - {{- range $directoriesConfig := $nodeConfig.directories }} - - path: {{ $directoriesConfig }} - {{- end }} - {{ end }} - {{- end }} - {{ end }} - config: - storeType: {{ .Values.cluster.storage.storeType }} - {{ if eq ".Values.cluster.storage.storeType" "bluestore" }} - metadataDevice: {{ .Values.cluster.storage.metadataDevice }} - databaseSizeMB: {{ .Values.cluster.storage.databaseSizeMB }} - {{ else if eq ".Values.cluster.storage.storeType" "filestore" }} - journalSizeMB: {{ .Values.cluster.storage.journalSizeMB }} - {{ end }} - osdsPerDevice: "1" # this value can be overridden at the node or device level - # encryptedDevice: "true" # the default value for this option is "false" - {{ if .Values.cluster.storage.dataPath }} - directories: - - path: "{{ .Values.cluster.storage.dataPath }}" - {{ end }} ---- -apiVersion: ceph.rook.io/v1 -kind: CephFilesystem -metadata: - name: {{ .Values.mds.name }} - namespace: {{ .Release.Namespace }} -spec: - metadataPool: - replicated: - size: {{ .Values.mds.replica }} - dataPools: - - replicated: - size: {{ .Values.mds.replica }} - preserveFilesystemOnDelete: true - metadataServer: - activeCount: 1 - activeStandby: true diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/clusterrole.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/clusterrole.yaml deleted file mode 100644 index 28c3ec5..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/clusterrole.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{/* -# -# Copyright (c) 2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{ if .Values.hook.cleanup.enable }} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ .Values.hook.cleanup.rbac.clusterRole }} -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "create", "list", "update", "delete"] - - apiGroups: [""] - resources: ["services"] - verbs: ["get","watch","list"] - - apiGroups: ["extensions", "apps"] - resources: ["deployments"] - verbs: ["get", "create", "list", "update", "delete"] - - apiGroups: ["apps"] - resources: ["daemonsets"] - verbs: ["get", "create", "list", "update", "delete"] -{{- end}} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/clusterrolebinding.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/clusterrolebinding.yaml deleted file mode 100644 index 29777e1..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{/* -# -# Copyright (c) 2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{ if .Values.hook.cleanup.enable }} -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ .Values.hook.cleanup.rbac.clusterRoleBinding }} -subjects: - - kind: ServiceAccount - name: {{ .Values.hook.cleanup.rbac.serviceAccount }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ .Values.hook.cleanup.rbac.clusterRole }} - apiGroup: rbac.authorization.k8s.io -{{- end}} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/post-delete-host-cleanup.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/post-delete-host-cleanup.yaml deleted file mode 100644 index 302716c..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/post-delete-host-cleanup.yaml +++ /dev/null @@ -1,76 +0,0 @@ -{{/* -# -# Copyright (c) 2020 Intel Corporation, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{- if .Values.hook.cleanup.enable }} -{{ $root := . }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-rook-ceph-host-cleanup - namespace: {{ $root.Release.Namespace }} - annotations: - "helm.sh/hook": "post-delete" - "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" -data: - rook_host_cleanup.sh: |- - #!/bin/bash - - rm -rf /var/lib/ceph/* - - stat /var/lib/ceph/mon-a/ > /dev/null 2>&1 - if [ x"$?" = x"0" ]; then - rm -rf /var/lib/ceph/mon-a/* - fi - - exit 0 - -{{- range $mon_host := $root.Values.hook.cleanup.mon_hosts }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: "rook-ceph-cleanup-{{ $mon_host }}" - namespace: {{ $root.Release.Namespace }} - labels: - heritage: {{ $root.Release.Service | quote }} - release: {{ $root.Release.Name | quote }} - chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" - annotations: - "helm.sh/hook": "post-delete" - "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" -spec: - template: - metadata: - name: "rook-ceph-cleanup-{{ $mon_host }}" - namespace: {{ $root.Release.Namespace }} - labels: - heritage: {{ $root.Release.Service | quote }} - release: {{ $root.Release.Name | quote }} - chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" - spec: - restartPolicy: OnFailure - volumes: - - name: rook-data - hostPath: - path: /var/lib/ceph - - name: config-rook-ceph-host-cleanup - configMap: - name: config-rook-ceph-host-cleanup - containers: - - name: host-cleanup - image: {{ $root.Values.hook.image }} - command: [ "/bin/bash", "/tmp/mount/rook_host_cleanup.sh" ] - volumeMounts: - - name: rook-data - mountPath: /var/lib/ceph - - name: config-rook-ceph-host-cleanup - mountPath: /tmp/mount - nodeName: {{ $mon_host }} -{{- end }} -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/pre-delete-rook-ceph-cleanup.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/pre-delete-rook-ceph-cleanup.yaml deleted file mode 100644 index eb4fa3a..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/pre-delete-rook-ceph-cleanup.yaml +++ /dev/null @@ -1,72 +0,0 @@ -{{/* -# -# Copyright (c) 2020 Intel Corporation, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{- if .Values.hook.cleanup.enable }} -{{ $root := . }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-rook-ceph-cleanup - namespace: {{ $root.Release.Namespace }} -data: - rook_clean_up.sh: |- - #!/bin/bash - - kubectl delete deployment -n ${NAMESPACE} --selector="app=rook-ceph-osd" - kubectl delete deployment -n ${NAMESPACE} --selector="app=rook-ceph-mgr" - - kubectl delete deployment -n ${NAMESPACE} csi-cephfsplugin-provisioner - kubectl delete deployment -n ${NAMESPACE} csi-rbdplugin-provisioner - - kubectl delete daemonsets.apps -n kube-system csi-cephfsplugin - kubectl delete daemonsets.apps -n kube-system csi-rbdplugin - - kubectl delete configmap -n ${NAMESPACE} rook-ceph-csi-config - - echo "rook ceph cluster cleanup" ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: rook-ceph-cleanup - namespace: {{ $root.Release.Namespace }} - labels: - heritage: {{$root.Release.Service | quote }} - release: {{$root.Release.Name | quote }} - chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" - annotations: - "helm.sh/hook": "pre-delete" - "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" -spec: - template: - metadata: - name: rook-ceph-cleanup - namespace: {{ $root.Release.Namespace }} - labels: - heritage: {{$root.Release.Service | quote }} - release: {{$root.Release.Name | quote }} - chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" - spec: - restartPolicy: OnFailure - serviceAccountName: {{ $root.Values.hook.cleanup.rbac.serviceAccount }} - volumes: - - name: config-rook-ceph-cleanup - configMap: - name: config-rook-ceph-cleanup - containers: - - name: rook-cleanup - image: {{ .Values.hook.image }} - command: [ "/bin/bash", "/tmp/mount/rook_clean_up.sh" ] - env: - - name: NAMESPACE - value: {{ $root.Release.Namespace }} - volumeMounts: - - name: config-rook-ceph-cleanup - mountPath: /tmp/mount -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/pre-install-duplex-preparation.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/pre-install-duplex-preparation.yaml deleted file mode 100644 index 61e64c8..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/pre-install-duplex-preparation.yaml +++ /dev/null @@ -1,82 +0,0 @@ -{{/* -# -# Copyright (c) 2020 Intel Corporation, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{- if .Values.hook.duplexPreparation.enable }} -{{ $root := . }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-rook-ceph-duplex-preparation - namespace: {{ $root.Release.Namespace }} - annotations: - "helm.sh/hook": "pre-install" - "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" -data: - rook_duplex_preparation.sh: |- - #!/bin/bash - - cat > endpoint.yaml << EOF - apiVersion: v1 - kind: ConfigMap - metadata: - name: rook-ceph-mon-endpoints - namespace: $NAMESPACE - data: - data: a=$FLOAT_IP:6789 - mapping: '{"node":{"a":{"Name":"$ACTIVE_CONTROLLER","Hostname":"$ACTIVE_CONTROLLER","Address":"$FLOAT_IP"}}}' - maxMonId: "0" - EOF - - kubectl apply -f endpoint.yaml - - rm -f endpoint.yaml ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: rook-ceph-duplex-preparation - namespace: {{ $root.Release.Namespace }} - labels: - heritage: {{$root.Release.Service | quote }} - release: {{$root.Release.Name | quote }} - chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" - annotations: - "helm.sh/hook": "pre-install" - "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" -spec: - template: - metadata: - name: rook-ceph-duplex-preparation - namespace: {{ $root.Release.Namespace }} - labels: - heritage: {{$root.Release.Service | quote }} - release: {{$root.Release.Name | quote }} - chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" - spec: - serviceAccountName: rook-ceph-system - restartPolicy: OnFailure - volumes: - - name: config-rook-ceph-duplex-preparation - configMap: - name: config-rook-ceph-duplex-preparation - containers: - - name: duplex-preparation - image: {{ .Values.hook.image }} - command: [ "/bin/bash", "/tmp/mount/rook_duplex_preparation.sh" ] - env: - - name: NAMESPACE - value: {{ $root.Release.Namespace }} - - name: ACTIVE_CONTROLLER - value: {{ $root.Values.hook.duplexPreparation.activeController }} - - name: FLOAT_IP - value: {{ $root.Values.hook.duplexPreparation.floatIP }} - volumeMounts: - - name: config-rook-ceph-duplex-preparation - mountPath: /tmp/mount -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/role.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/role.yaml deleted file mode 100644 index 646e72b..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/role.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{/* -# -# Copyright (c) 2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{ if .Values.hook.cleanup.enable }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ .Values.hook.cleanup.rbac.role }} - namespace: {{ .Release.Namespace }} -rules: -- apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "create", "list", "update"] -- apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "create", "list", "update"] -- apiGroups: [""] - resources: ["namespaces"] - verbs: ["get", "create", "list", "update"] -{{- end}} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/rolebinding.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/rolebinding.yaml deleted file mode 100644 index 4eb7a89..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/rolebinding.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{/* -# -# Copyright (c) 2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{ if .Values.hook.cleanup.enable }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ .Values.hook.cleanup.rbac.roleBinding }} - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ .Values.hook.cleanup.rbac.role }} -subjects: -- kind: ServiceAccount - name: {{ .Values.hook.cleanup.rbac.serviceAccount }} - namespace: {{ .Release.Namespace }} -{{- end}} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/serviceaccount.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/serviceaccount.yaml deleted file mode 100644 index 975d504..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/serviceaccount.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -# -# Copyright (c) 2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{ if .Values.hook.cleanup.enable }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.hook.cleanup.rbac.serviceAccount }} - namespace: {{ .Release.Namespace }} -imagePullSecrets: - - name: default-registry-key -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/toolbox.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/toolbox.yaml deleted file mode 100644 index 746d99c..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/templates/toolbox.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rook-ceph-tools - namespace: kube-system - labels: - app: rook-ceph-tools -spec: - replicas: 1 - selector: - matchLabels: - app: rook-ceph-tools - template: - metadata: - labels: - app: rook-ceph-tools - spec: - dnsPolicy: ClusterFirstWithHostNet - containers: - - name: rook-ceph-tools - image: "{{ .Values.toolbox.image.repository }}:{{ .Values.toolbox.image.tag }}" - command: ["/bin/bash"] - args: ["-m", "-c", "/usr/local/bin/toolbox.sh"] - imagePullPolicy: IfNotPresent - tty: true - securityContext: - runAsNonRoot: true - runAsUser: 2016 - runAsGroup: 2016 - env: - - name: ROOK_CEPH_USERNAME - valueFrom: - secretKeyRef: - name: rook-ceph-mon - key: ceph-username - - name: ROOK_CEPH_SECRET - valueFrom: - secretKeyRef: - name: rook-ceph-mon - key: ceph-secret - volumeMounts: - - mountPath: /etc/ceph - name: ceph-config - - name: mon-endpoint-volume - mountPath: /etc/rook - volumes: - - name: mon-endpoint-volume - configMap: - name: rook-ceph-mon-endpoints - items: - - key: data - path: mon-endpoints - - name: ceph-config - emptyDir: {} - tolerations: - - key: "node.kubernetes.io/unreachable" - operator: "Exists" - effect: "NoExecute" - tolerationSeconds: 5 diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/values.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/values.yaml deleted file mode 100644 index 09ea93d..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-ceph/values.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# Default values for ceph-cluster -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -cluster: - image: - repository: quay.io/ceph/ceph - tag: v16.2.9 - pullPolicy: IfNotPresent - # Tolerations for the ceph-cluster to allow it to run on nodes with particular taints - tolerations: [] - mon: - count: 3 - allowMultiplePerNode: true - hostNetwork: true - storage: - storeType: bluestore - databaseSizeMB: 1024 - ## Annotations to be added to pod - annotations: {} - ## LogLevel can be set to: TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR or CRITICAL - logLevel: INFO - # Writing to the hostPath is required for the Ceph mon and osd pods. Given the restricted permissions in OpenShift with SELinux, - # the pod must be running privileged in order to write to the hostPath volume, this must be set to true then. - hostpathRequiresPrivileged: false - # Disable automatic orchestration when new devices are discovered. - disableDeviceHotplug: false - - -mds: - name: stxfs - replica: 3 - - -toolbox: - image: - prefix: rook - repository: rook/ceph - tag: v1.9.6 - pullPolicy: IfNotPresent - - -hook: - image: docker.io/openstackhelm/ceph-config-helper:ubuntu_bionic-20220802 - duplexPreparation: - enable: false - activeController: controller-0 - floatIP: 192.188.204.2 - cleanup: - enable: true - rbac: - clusterRole: rook-ceph-cleanup - clusterRoleBinding: rook-ceph-cleanup - role: rook-ceph-cleanup - roleBinding: rook-ceph-cleanup - serviceAccount: rook-ceph-cleanup - mon_hosts: - - controller-0 - diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/Chart.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/Chart.yaml deleted file mode 100644 index c7c0712..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/Chart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -description: File, Block, and Object Storage Services for your Cloud-Native Environment -name: rook-operator -version: 0.1.0 -icon: https://rook.io/images/rook-logo.svg -sources: - - https://github.com/rook/rook diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/README.md b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/README.md deleted file mode 100644 index 272e6ab..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/README.md +++ /dev/null @@ -1 +0,0 @@ -See the [Operator Helm Chart](/Documentation/helm-operator.md) documentation. diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/NOTES.txt b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/NOTES.txt deleted file mode 100644 index 8315ff8..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/NOTES.txt +++ /dev/null @@ -1,20 +0,0 @@ -The Rook Operator has been installed. Check its status by running: - kubectl --namespace {{ .Release.Namespace }} get pods -l "app=rook-ceph-operator" - -Visit https://rook.io/docs/rook/master for instructions on how to create and configure Rook clusters - -Note: You cannot just create a CephCluster resource, you need to also create a namespace and -install suitable RBAC roles and role bindings for the cluster. The Rook Operator will not do -this for you. Sample CephCluster manifest templates that include RBAC resources are available: - -- https://rook.github.io/docs/rook/master/ceph-quickstart.html -- https://github.com/rook/rook/blob/master/cluster/examples/kubernetes/ceph/cluster.yaml - -Important Notes: -- The links above are for the unreleased master version, if you deploy a different release you must find matching manifests. -- You must customise the 'CephCluster' resource at the bottom of the sample manifests to met your situation. -- Each CephCluster must be deployed to its own namespace, the samples use `rook-ceph` for the cluster. -- The sample manifests assume you also installed the rook-ceph operator in the `rook-ceph` namespace. -- The helm chart includes all the RBAC required to create a CephCluster CRD in the same namespace. -- Any disk devices you add to the cluster in the 'CephCluster' must be empty (no filesystem and no partitions). -- In the 'CephCluster' you must refer to disk devices by their '/dev/something' name, e.g. 'sdb' or 'xvde'. diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/_helpers.tpl b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/_helpers.tpl deleted file mode 100644 index 529b490..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/_helpers.tpl +++ /dev/null @@ -1,26 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Define imagePullSecrets option to pass to all service accounts -*/}} -{{- define "imagePullSecrets" }} -{{- if .Values.imagePullSecrets -}} -imagePullSecrets: -{{ toYaml .Values.imagePullSecrets }} -{{- end -}} -{{- end -}} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/clusterrole.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/clusterrole.yaml deleted file mode 100644 index 6953e6d..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/clusterrole.yaml +++ /dev/null @@ -1,526 +0,0 @@ -{{- if .Values.operator.rbacEnable }} -# The cluster role for managing all the cluster-specific resources in a namespace -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-cluster-mgmt - labels: - operator: rook - storage-backend: ceph -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.rook.ceph.io/aggregate-to-rook-ceph-cluster-mgmt: "true" -rules: [] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-cluster-mgmt-rules - labels: - operator: rook - storage-backend: ceph - rbac.rook.ceph.io/aggregate-to-rook-ceph-cluster-mgmt: "true" -rules: -- apiGroups: - - "" - resources: - - secrets - - pods - - pods/log - - services - - configmaps - verbs: - - get - - list - - watch - - patch - - create - - update - - delete -- apiGroups: - - apps - resources: - - deployments - - daemonsets - verbs: - - get - - list - - watch - - create - - update - - delete ---- -# The cluster role for managing the Rook CRDs -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-global - labels: - operator: rook - storage-backend: ceph -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-rook-ceph-global: "true" -rules: [] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-global-rules - labels: - operator: rook - storage-backend: ceph - rbac.ceph.rook.io/aggregate-to-rook-ceph-global: "true" -rules: -- apiGroups: - - "" - resources: - # Pod access is needed for fencing - - pods - # Node access is needed for determining nodes where mons should run - - nodes - - nodes/proxy - - services - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - events - # PVs and PVCs are managed by the Rook provisioner - - persistentvolumes - - persistentvolumeclaims - - endpoints - verbs: - - get - - list - - watch - - patch - - create - - update - - delete -- apiGroups: - - storage.k8s.io - resources: - - storageclasses - verbs: - - get - - list - - watch -- apiGroups: - - batch - resources: - - jobs - - cronjobs - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - ceph.rook.io - resources: - - "*" - verbs: - - "*" -- apiGroups: - - rook.io - resources: - - "*" - verbs: - - "*" -- apiGroups: - - policy - - apps - resources: - # This is for the clusterdisruption controller - - poddisruptionbudgets - # This is for both clusterdisruption and nodedrain controllers - - deployments - - replicasets - verbs: - - "*" -- apiGroups: - - healthchecking.openshift.io - resources: - - machinedisruptionbudgets - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - machine.openshift.io - resources: - - machines - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - storage.k8s.io - resources: - - csidrivers - verbs: - - "*" ---- -# Aspects of ceph-mgr that require cluster-wide access -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-mgr-cluster - labels: - operator: rook - storage-backend: ceph -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-rook-ceph-mgr-cluster: "true" -rules: [] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-mgr-cluster-rules - labels: - operator: rook - storage-backend: ceph - rbac.ceph.rook.io/aggregate-to-rook-ceph-mgr-cluster: "true" -rules: -- apiGroups: - - "" - resources: - - configmaps - - nodes - - nodes/proxy - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - list - - get - - watch ---- -# Aspects of ceph-mgr that require access to the system namespace -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-mgr-system -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-rook-ceph-mgr-system: "true" -rules: [] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-mgr-system-rules - labels: - rbac.ceph.rook.io/aggregate-to-rook-ceph-mgr-system: "true" -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-object-bucket - labels: - operator: rook - storage-backend: ceph - rbac.ceph.rook.io/aggregate-to-rook-ceph-mgr-cluster: "true" -rules: -- apiGroups: - - "" - verbs: - - "*" - resources: - - secrets - - configmaps -- apiGroups: - - storage.k8s.io - resources: - - storageclasses - verbs: - - get - - list - - watch -- apiGroups: - - "objectbucket.io" - verbs: - - "*" - resources: - - "*" ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-osd -rules: -- apiGroups: - - "" - resources: - - nodes - verbs: - - get - - list -{{- if .Values.operator.agent }}{{ if ne .Values.operator.agent.mountSecurityMode "Any" }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-agent-mount - labels: - operator: rook - storage-backend: ceph -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-rook-ceph-agent-mount: "true" -rules: [] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-agent-mount-rules - labels: - operator: rook - storage-backend: ceph - rbac.ceph.rook.io/aggregate-to-rook-ceph-agent-mount: "true" -rules: -- apiGroups: - - "" - resources: - - secrets - verbs: - - get -{{- end }}{{ end }} ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-csi-nodeplugin -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-cephfs-csi-nodeplugin: "true" -rules: [] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-csi-nodeplugin-rules - labels: - rbac.ceph.rook.io/aggregate-to-cephfs-csi-nodeplugin: "true" -rules: - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "update"] - - apiGroups: [""] - resources: ["namespaces"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list"] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-external-provisioner-runner -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-cephfs-external-provisioner-runner: "true" -rules: [] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-external-provisioner-runner-rules - labels: - rbac.ceph.rook.io/aggregate-to-cephfs-external-provisioner-runner: "true" -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "delete", "update", "patch"] - - apiGroups: [""] - resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["list", "watch", "create", "update", "patch"] - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update", "patch"] - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["persistentvolumeclaims/status"] - verbs: ["update", "patch"] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-csi-nodeplugin -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-rbd-csi-nodeplugin: "true" -rules: [] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-csi-nodeplugin-rules - labels: - rbac.ceph.rook.io/aggregate-to-rbd-csi-nodeplugin: "true" -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "update"] - - apiGroups: [""] - resources: ["namespaces"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list"] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-external-provisioner-runner -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-rbd-external-provisioner-runner: "true" -rules: [] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-external-provisioner-runner-rules - labels: - rbac.ceph.rook.io/aggregate-to-rbd-external-provisioner-runner: "true" -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "delete", "update", "patch"] - - apiGroups: [""] - resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update", "patch"] - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "watch"] - - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["list", "watch", "create", "update", "patch"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshots"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshotcontents"] - verbs: ["create", "get", "list", "watch", "update", "delete"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshotclasses"] - verbs: ["get", "list", "watch"] - - apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["create", "list", "watch", "delete", "get", "update"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshots/status"] - verbs: ["update"] - - apiGroups: [""] - resources: ["persistentvolumeclaims/status"] - verbs: ["update", "patch"] -{{- end }} -{{- if .Values.operator.pspEnable }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-system-psp-user - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.ceph.rook.io/aggregate-to-rook-ceph-system-psp-user: "true" -rules: [] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: 'psp:rook' - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - rbac.ceph.rook.io/aggregate-to-rook-ceph-system-psp-user: "true" -rules: -- apiGroups: - - policy - resources: - - podsecuritypolicies - resourceNames: - - 00-rook-ceph-operator - verbs: - - use -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/clusterrolebinding.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/clusterrolebinding.yaml deleted file mode 100644 index 50c4d5b..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,260 +0,0 @@ -{{- if .Values.operator.rbacEnable }} -# Grant the rook system daemons cluster-wide access to manage the Rook CRDs, PVCs, and storage classes -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-global - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-global -subjects: -- kind: ServiceAccount - name: rook-ceph-system - namespace: {{ .Release.Namespace }} ---- -# Allow the ceph mgr to access cluster-wide resources necessary for the mgr modules -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-mgr-cluster -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-mgr-cluster -subjects: -- kind: ServiceAccount - name: rook-ceph-mgr - namespace: {{ .Release.Namespace }} ---- -# Allow the ceph osd to access cluster-wide resources necessary for determining their topology location -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-osd -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-osd -subjects: -- kind: ServiceAccount - name: rook-ceph-osd - namespace: {{ .Release.Namespace }} ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-object-bucket -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-object-bucket -subjects: - - kind: ServiceAccount - name: rook-ceph-system - namespace: {{ .Release.Namespace }} ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-csi-nodeplugin -subjects: - - kind: ServiceAccount - name: rook-csi-cephfs-plugin-sa - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: cephfs-csi-nodeplugin - apiGroup: rbac.authorization.k8s.io ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-csi-provisioner-role -subjects: - - kind: ServiceAccount - name: rook-csi-cephfs-provisioner-sa - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: cephfs-external-provisioner-runner - apiGroup: rbac.authorization.k8s.io ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-csi-provisioner-role -subjects: - - kind: ServiceAccount - name: rook-csi-rbd-provisioner-sa - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: rbd-external-provisioner-runner - apiGroup: rbac.authorization.k8s.io -{{- if .Values.operator.pspEnable }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: rook-ceph-system-psp - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: rook-ceph-system - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: rook-ceph-default-psp - namespace: {{ .Release.Namespace }} - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: default - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: rook-ceph-system-psp-users - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-system-psp-user -subjects: -- kind: ServiceAccount - name: rook-ceph-system - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: rook-csi-cephfs-provisioner-sa-psp -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: rook-csi-cephfs-provisioner-sa - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: rook-csi-cephfs-plugin-sa-psp -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: rook-csi-cephfs-plugin-sa - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: rook-csi-rbd-plugin-sa-psp -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: rook-csi-rbd-plugin-sa - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: rook-csi-rbd-provisioner-sa-psp -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: rook-csi-rbd-provisioner-sa - namespace: {{ .Release.Namespace }} ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-csi-nodeplugin -subjects: - - kind: ServiceAccount - name: rook-csi-rbd-plugin-sa - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: rbd-csi-nodeplugin - apiGroup: rbac.authorization.k8s.io ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: rook-ceph-osd-psp - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: rook-ceph-osd - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: rook-ceph-mgr-psp - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: rook-ceph-mgr - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: rook-ceph-cmd-reporter-psp - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: 'psp:rook' -subjects: - - kind: ServiceAccount - name: rook-ceph-cmd-reporter - namespace: {{ .Release.Namespace }} -{{- end }} -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/deployment.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/deployment.yaml deleted file mode 100644 index 702ee04..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/deployment.yaml +++ /dev/null @@ -1,299 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-sa-init - namespace: {{ .Release.Namespace }} -data: - check_sa_default.sh: |- - #!/bin/bash - - kubectl describe sa default -n $NAMESPACE | grep "${IMAGE_PULL_SECRET}" - if [ $? -ne 0 ]; then - echo "add image pull secret to default account" - kubectl patch sa default -n $NAMESPACE --type=merge -p '{"imagePullSecrets": [{"name": "'${IMAGE_PULL_SECRET}'"}]}' - else - echo "${IMAGE_PULL_SECRET} already set to default service account" - fi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rook-ceph-operator - namespace: {{ .Release.Namespace }} - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -spec: - replicas: 1 - selector: - matchLabels: - app: rook-ceph-operator - template: - metadata: - labels: - app: rook-ceph-operator - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -{{- if .Values.operator.annotations }} - annotations: -{{ toYaml .Values.operator.annotations | indent 8 }} -{{- end }} - spec: - volumes: - - name: config-sa-volume-init - configMap: - name: config-sa-init - - name: rook-config - emptyDir: {} - - name: default-config-dir - emptyDir: {} - - name: webhook-cert - emptyDir: {} - initContainers: - - name: rook-sa-init - image: "{{ .Values.saInit.images.tags.sa_init_provisioner }}" - imagePullPolicy: IfNotPresent - command: [ "/bin/bash", "/tmp/mount/check_sa_default.sh" ] - env: - - name: NAMESPACE - value: {{ .Release.Namespace }} - - name: IMAGE_PULL_SECRET - value: default-registry-key - volumeMounts: - - name: config-sa-volume-init - mountPath: /tmp/mount - containers: - - name: rook-ceph-operator - image: "{{ .Values.operator.image.repository }}:{{ .Values.operator.image.tag }}" - imagePullPolicy: {{ .Values.operator.image.pullPolicy }} - args: ["ceph", "operator"] - securityContext: - runAsNonRoot: true - runAsUser: 2016 - runAsGroup: 2016 - volumeMounts: - - mountPath: /var/lib/rook - name: rook-config - - mountPath: /etc/ceph - name: default-config-dir - - mountPath: /etc/webhook - name: webhook-cert - env: - - name: ROOK_CURRENT_NAMESPACE_ONLY - value: {{ .Values.operator.currentNamespaceOnly | quote }} -{{- if not .Values.operator.rbacEnable }} - - name: RBAC_ENABLED - value: "false" -{{- end }} -{{- if .Values.operator.agent }} -{{- if .Values.operator.agent.toleration }} - - name: AGENT_TOLERATION - value: {{ .Values.operator.agent.toleration }} -{{- end }} -{{- if .Values.operator.agent.tolerationKey }} - - name: AGENT_TOLERATION_KEY - value: {{ .Values.operator.agent.tolerationKey }} -{{- end }} -{{- if .Values.operator.agent.tolerations }} - - name: AGENT_TOLERATIONS - value: {{ toYaml .Values.operator.agent.tolerations | quote }} -{{- end }} -{{- if .Values.operator.agent.nodeAffinity }} - - name: AGENT_NODE_AFFINITY - value: {{ .Values.operator.agent.nodeAffinity }} -{{- end }} -{{- if .Values.operator.agent.priorityClassName }} - - name: AGENT_PRIORITY_CLASS_NAME - value: {{ .Values.operator.agent.priorityClassName }} -{{- end }} -{{- if .Values.operator.agent.mountSecurityMode }} - - name: AGENT_MOUNT_SECURITY_MODE - value: {{ .Values.operator.agent.mountSecurityMode }} -{{- end }} -{{- if .Values.operator.agent.flexVolumeDirPath }} - - name: FLEXVOLUME_DIR_PATH - value: {{ .Values.operator.agent.flexVolumeDirPath }} -{{- end }} -{{- if .Values.operator.agent.libModulesDirPath }} - - name: LIB_MODULES_DIR_PATH - value: {{ .Values.operator.agent.libModulesDirPath }} -{{- end }} -{{- if .Values.operator.agent.mounts }} - - name: AGENT_MOUNTS - value: {{ .Values.operator.agent.mounts }} -{{- end }} -{{- end }} -{{- if .Values.operator.discover }} -{{- if .Values.operator.discover.toleration }} - - name: DISCOVER_TOLERATION - value: {{ .Values.operator.discover.toleration }} -{{- end }} -{{- if .Values.operator.discover.tolerationKey }} - - name: DISCOVER_TOLERATION_KEY - value: {{ .Values.operator.discover.tolerationKey }} -{{- end }} -{{- if .Values.operator.discover.tolerations }} - - name: DISCOVER_TOLERATIONS - value: {{ toYaml .Values.operator.discover.tolerations | quote }} -{{- end }} -{{- if .Values.operator.discover.priorityClassName }} - - name: DISCOVER_PRIORITY_CLASS_NAME - value: {{ .Values.operator.discover.priorityClassName }} -{{- end }} -{{- if .Values.operator.discover.nodeAffinity }} - - name: DISCOVER_AGENT_NODE_AFFINITY - value: {{ .Values.operator.discover.nodeAffinity }} -{{- end }} -{{- end }} - - name: ROOK_HOSTPATH_REQUIRES_PRIVILEGED - value: "{{ .Values.operator.hostpathRequiresPrivileged }}" - - name: ROOK_LOG_LEVEL - value: {{ .Values.operator.logLevel }} - - name: ROOK_ENABLE_SELINUX_RELABELING - value: "{{ .Values.operator.enableSelinuxRelabeling }}" - - name: ROOK_DISABLE_DEVICE_HOTPLUG - value: "{{ .Values.operator.disableDeviceHotplug }}" -{{- if .Values.operator.csi }} - - name: ROOK_CSI_ENABLE_RBD - value: {{ .Values.operator.csi.enableRbdDriver | quote }} - - name: ROOK_CSI_ENABLE_CEPHFS - value: {{ .Values.operator.csi.enableCephfsDriver | quote }} - - name: CSI_ENABLE_SNAPSHOTTER - value: {{ .Values.operator.csi.enableSnapshotter | quote }} -{{- if .Values.operator.csi.cephFSPluginUpdateStrategy }} - - name: CSI_CEPHFS_PLUGIN_UPDATE_STRATEGY - value: {{ .Values.operator.csi.cephFSPluginUpdateStrategy | quote }} -{{- end }} -{{- if .Values.operator.csi.rbdPluginUpdateStrategy }} - - name: CSI_RBD_PLUGIN_UPDATE_STRATEGY - value: {{ .Values.operator.csi.rbdPluginUpdateStrategy | quote }} -{{- end }} -{{- if .Values.operator.csi.kubeletDirPath }} - - name: ROOK_CSI_KUBELET_DIR_PATH - value: {{ .Values.operator.csi.kubeletDirPath | quote }} -{{- end }} - - name: ROOK_CSI_ENABLE_GRPC_METRICS - value: {{ .Values.operator.csi.enableGrpcMetrics | quote }} -{{- if .Values.operator.csi.cephcsi }} -{{- if .Values.operator.csi.cephcsi.image }} - - name: ROOK_CSI_CEPH_IMAGE - value: {{ .Values.operator.csi.cephcsi.image | quote }} -{{- end }} -{{- end }} -{{- if .Values.operator.csi.registrar }} -{{- if .Values.operator.csi.registrar.image }} - - name: ROOK_CSI_REGISTRAR_IMAGE - value: {{ .Values.operator.csi.registrar.image | quote }} -{{- end }} -{{- end }} -{{- if .Values.operator.csi.provisioner }} -{{- if .Values.operator.csi.provisioner.image }} - - name: ROOK_CSI_PROVISIONER_IMAGE - value: {{ .Values.operator.csi.provisioner.image | quote }} -{{- end }} -{{- end }} -{{- if .Values.operator.csi.snapshotter }} -{{- if .Values.operator.csi.snapshotter.image }} - - name: ROOK_CSI_SNAPSHOTTER_IMAGE - value: {{ .Values.operator.csi.snapshotter.image | quote }} -{{- end }} -{{- end }} -{{- if .Values.operator.csi.attacher }} -{{- if .Values.operator.csi.attacher.image }} - - name: ROOK_CSI_ATTACHER_IMAGE - value: {{ .Values.operator.csi.attacher.image | quote }} -{{- end }} -{{- end }} -{{- if .Values.operator.csi.resizer }} -{{- if .Values.operator.csi.resizer.image }} - - name: ROOK_CSI_RESIZER_IMAGE - value: {{ .Values.operator.csi.resizer.image | quote }} -{{- end }} -{{- end }} -{{- if .Values.operator.csi.provisionerTolerations }} - - name: CSI_PROVISIONER_TOLERATIONS - value: {{ toYaml .Values.operator.csi.provisionerTolerations | quote }} -{{- end }} -{{- if .Values.operator.csi.provisionerNodeAffinity }} - - name: CSI_PROVISIONER_NODE_AFFINITY - value: {{ .Values.operator.csi.provisionerNodeAffinity }} -{{- end }} -{{- if .Values.operator.csi.pluginTolerations }} - - name: CSI_PLUGIN_TOLERATIONS - value: {{ toYaml .Values.operator.csi.pluginTolerations | quote }} -{{- end }} -{{- if .Values.operator.csi.pluginNodeAffinity }} - - name: CSI_PLUGIN_NODE_AFFINITY - value: {{ .Values.operator.csi.pluginNodeAffinity }} -{{- end }} -{{- if .Values.operator.csi.cephfsGrpcMetricsPort }} - - name: CSI_CEPHFS_GRPC_METRICS_PORT - value: {{ .Values.operator.csi.cephfsGrpcMetricsPort | quote }} -{{- end }} -{{- if .Values.operator.csi.cephfsLivenessMetricsPort }} - - name: CSI_CEPHFS_LIVENESS_METRICS_PORT - value: {{ .Values.operator.csi.cephfsLivenessMetricsPort | quote }} -{{- end }} -{{- if .Values.operator.csi.rbdGrpcMetricsPort }} - - name: CSI_RBD_GRPC_METRICS_PORT - value: {{ .Values.operator.csi.rbdGrpcMetricsPort | quote }} -{{- end }} -{{- if .Values.operator.csi.rbdLivenessMetricsPort }} - - name: CSI_RBD_LIVENESS_METRICS_PORT - value: {{ .Values.operator.csi.rbdLivenessMetricsPort | quote }} -{{- end }} -{{- if .Values.operator.csi.forceCephFSKernelClient }} - - name: CSI_FORCE_CEPHFS_KERNEL_CLIENT - value: {{ .Values.operator.csi.forceCephFSKernelClient | quote }} -{{- end }} -{{- end }} - - name: ROOK_ENABLE_FLEX_DRIVER - value: "{{ .Values.operator.enableFlexDriver }}" - - name: ROOK_ENABLE_DISCOVERY_DAEMON - value: "{{ .Values.operator.enableDiscoveryDaemon }}" - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace -{{- if .Values.operator.cephStatusCheckInterval }} - - name: ROOK_CEPH_STATUS_CHECK_INTERVAL - value: {{ .Values.operator.cephStatusCheckInterval }} -{{- end }} -{{- if .Values.operator.mon }} -{{- if .Values.operator.mon.healthCheckInterval }} - - name: ROOK_MON_HEALTHCHECK_INTERVAL - value: {{ .Values.operator.mon.healthCheckInterval }} -{{- end }} -{{- if .Values.operator.mon.monOutTimeout }} - - name: ROOK_MON_OUT_TIMEOUT - value: {{ .Values.operator.mon.monOutTimeout }} -{{- end }} -{{- end }} -{{- if .Values.operator.unreachableNodeTolerationSeconds }} - - name: ROOK_UNREACHABLE_NODE_TOLERATION_SECONDS - value: {{ .Values.operator.unreachableNodeTolerationSeconds | quote }} -{{- end }} - resources: -{{ toYaml .Values.operator.resources | indent 10 }} -{{- if .Values.operator.useOperatorHostNetwork }} - hostNetwork: true -{{- end }} -{{- if .Values.operator.nodeSelector }} - nodeSelector: -{{ toYaml .Values.operator.nodeSelector | indent 8 }} -{{- end }} -{{- if .Values.operator.tolerations }} - tolerations: -{{ toYaml .Values.operator.tolerations | indent 8 }} -{{- end }} -{{- if .Values.operator.rbacEnable }} - serviceAccountName: rook-ceph-system -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/pre-delete-ceph-cluster.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/pre-delete-ceph-cluster.yaml deleted file mode 100644 index 750b428..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/pre-delete-ceph-cluster.yaml +++ /dev/null @@ -1,66 +0,0 @@ -{{/* -# -# Copyright (c) 2020 Intel Corporation, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -*/}} - -{{- if .Values.cleanup.enable }} -{{ $root := . }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-rook-cleanup - namespace: {{ $root.Release.Namespace }} -data: - rook_clean_up.sh: |- - #!/bin/bash - - kubectl delete cronjob -n ${NAMESPACE} stx-ceph-mon-audit - kubectl delete cephclusters.ceph.rook.io ${CLUSTER_NAME} -n ${NAMESPACE} - - echo "delete ceph cluster" ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: rook-cleanup - namespace: {{ $root.Release.Namespace }} - labels: - heritage: {{$root.Release.Service | quote }} - release: {{$root.Release.Name | quote }} - chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" - annotations: - "helm.sh/hook": "pre-delete" - "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" -spec: - template: - metadata: - name: rook-pre-delete-cleanup - namespace: {{ $root.Release.Namespace }} - labels: - heritage: {{$root.Release.Service | quote }} - release: {{$root.Release.Name | quote }} - chart: "{{$root.Chart.Name}}-{{$root.Chart.Version}}" - spec: - restartPolicy: OnFailure - serviceAccountName: rook-ceph-system - volumes: - - name: config-rook-cleanup - configMap: - name: config-rook-cleanup - containers: - - name: rook-cleanup - image: {{ .Values.saInit.images.tags.sa_init_provisioner }} - command: [ "/bin/bash", "/tmp/mount/rook_clean_up.sh" ] - env: - - name: NAMESPACE - value: {{ $root.Release.Namespace }} - - name: CLUSTER_NAME - value: {{ .Values.cleanup.cluster_cleanup }} - volumeMounts: - - name: config-rook-cleanup - mountPath: /tmp/mount -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/psp.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/psp.yaml deleted file mode 100644 index 3a79a91..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/psp.yaml +++ /dev/null @@ -1,87 +0,0 @@ -{{- if .Values.pspEnable }} -# PSP for rook-ceph-operator - -# Most of the teams follow the kubernetes docs and have these PSPs. -# * privileged (for kube-system namespace) -# * restricted (for all logged in users) -# -# If we name it as `rook-ceph-operator`, it comes next to `restricted` PSP alphabetically, -# and applies `restricted` capabilities to `rook-system`. Thats reason this is named with `00-rook-ceph-operator`, -# so it stays somewhere close to top and `rook-system` gets the intended PSP. -# -# More info on PSP ordering : https://kubernetes.io/docs/concepts/policy/pod-security-policy/#policy-order - -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: 00-rook-ceph-operator - annotations: - seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'runtime/default' - seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default' -spec: - privileged: true - allowedCapabilities: - # required by CSI - - SYS_ADMIN - - MKNOD - # fsGroup - the flexVolume agent has fsGroup capabilities and could potentially be any group - fsGroup: - rule: RunAsAny - # runAsUser, supplementalGroups - Rook needs to run some pods as root - # Ceph pods could be run as the Ceph user, but that user isn't always known ahead of time - runAsUser: - rule: RunAsAny - supplementalGroups: - rule: RunAsAny - # seLinux - seLinux context is unknown ahead of time; set if this is well-known - seLinux: - rule: RunAsAny - volumes: - # recommended minimum set - - configMap - - downwardAPI - - emptyDir - - persistentVolumeClaim - - secret - - projected - # required for Rook - - hostPath - - flexVolume - # allowedHostPaths can be set to Rook's known host volume mount points when they are fully-known - # directory-based OSDs make this hard to nail down - # allowedHostPaths: - # - pathPrefix: "/run/udev" # for OSD prep - # readOnly: false - # - pathPrefix: "/dev" # for OSD prep - # readOnly: false - # - pathPrefix: "/var/lib/rook" # or whatever the dataDirHostPath value is set to - # readOnly: false - # Ceph requires host IPC for setting up encrypted devices - hostIPC: true - # Ceph OSDs need to share the same PID namespace - hostPID: true - # hostNetwork can be set to 'false' if host networking isn't used - hostNetwork: true - hostPorts: - # Ceph messenger protocol v1 - - min: 6789 - max: 6790 # <- support old default port - # Ceph messenger protocol v2 - - min: 3300 - max: 3300 - # Ceph RADOS ports for OSDs, MDSes - - min: 6800 - max: 7300 - # # Ceph dashboard port HTTP (not recommended) - # - min: 7000 - # max: 7000 - # Ceph dashboard port HTTPS - - min: 8443 - max: 8443 - # Ceph mgr Prometheus Metrics - - min: 9283 - max: 9283 - # port for CSIAddons - - min: 9070 - max: 9070 -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/resources.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/resources.yaml deleted file mode 100644 index 89fb585..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/resources.yaml +++ /dev/null @@ -1,10206 +0,0 @@ -############################################################################## -# Create the CRDs that are necessary before creating your Rook cluster. -# These resources *must* be created before the cluster.yaml or their variants. -############################################################################## ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephblockpoolradosnamespaces.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBlockPoolRadosNamespace - listKind: CephBlockPoolRadosNamespaceList - plural: cephblockpoolradosnamespaces - singular: cephblockpoolradosnamespace - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: CephBlockPoolRadosNamespace represents a Ceph BlockPool Rados Namespace - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec represents the specification of a Ceph BlockPool Rados Namespace - properties: - blockPoolName: - description: BlockPoolName is the name of Ceph BlockPool. Typically it's the name of the CephBlockPool CR. - type: string - required: - - blockPoolName - type: object - status: - description: Status represents the status of a CephBlockPool Rados Namespace - properties: - info: - additionalProperties: - type: string - nullable: true - type: object - phase: - description: ConditionType represent a resource's status - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephblockpools.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBlockPool - listKind: CephBlockPoolList - plural: cephblockpools - singular: cephblockpool - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephBlockPool represents a Ceph Storage Pool - 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: NamedBlockPoolSpec allows a block pool to be created with a non-default name. This is more specific than the NamedPoolSpec so we get schema validation on the allowed pool names that can be specified. - properties: - compressionMode: - description: 'DEPRECATED: use Parameters instead, e.g., Parameters["compression_mode"] = "force" The inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force) Do NOT set a default value for kubebuilder as this will override the Parameters' - enum: - - none - - passive - - aggressive - - force - - "" - nullable: true - type: string - crushRoot: - description: The root of the crush hierarchy utilized by the pool - nullable: true - type: string - deviceClass: - description: The device class the OSD should set to for use in the pool - nullable: true - type: string - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool - type: boolean - erasureCoded: - description: The erasure code settings - properties: - algorithm: - description: The algorithm for erasure coding - type: string - codingChunks: - description: Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type). This is the number of OSDs that can be lost simultaneously before data cannot be recovered. - minimum: 0 - type: integer - dataChunks: - description: Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type). The number of chunks required to recover an object when any single OSD is lost is the same as dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery. - minimum: 0 - type: integer - required: - - codingChunks - - dataChunks - type: object - failureDomain: - description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map' - type: string - mirroring: - description: The mirroring settings - properties: - enabled: - description: Enabled whether this pool is mirrored or not - type: boolean - mode: - description: 'Mode is the mirroring mode: either pool or image' - type: string - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - snapshotSchedules: - description: SnapshotSchedules is the scheduling of snapshot for mirrored images/pools - items: - description: SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool - properties: - interval: - description: Interval represent the periodicity of the snapshot. - type: string - path: - description: Path is the path to snapshot, only valid for CephFS - type: string - startTime: - description: StartTime indicates when to start the snapshot - type: string - type: object - type: array - type: object - name: - description: The desired name of the pool if different from the CephBlockPool CR name. - enum: - - device_health_metrics - - .nfs - - .mgr - type: string - parameters: - additionalProperties: - type: string - description: Parameters is a list of properties to enable on a given pool - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - quotas: - description: The quota settings - nullable: true - properties: - maxBytes: - description: MaxBytes represents the quota in bytes Deprecated in favor of MaxSize - format: int64 - type: integer - maxObjects: - description: MaxObjects represents the quota in objects - format: int64 - type: integer - maxSize: - description: MaxSize represents the quota in bytes as a string - pattern: ^[0-9]+[\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$ - type: string - type: object - replicated: - description: The replication settings - properties: - hybridStorage: - description: HybridStorage represents hybrid storage tier settings - nullable: true - properties: - primaryDeviceClass: - description: PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD - minLength: 1 - type: string - secondaryDeviceClass: - description: SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs - minLength: 1 - type: string - required: - - primaryDeviceClass - - secondaryDeviceClass - type: object - replicasPerFailureDomain: - description: ReplicasPerFailureDomain the number of replica in the specified failure domain - minimum: 1 - type: integer - requireSafeReplicaSize: - description: RequireSafeReplicaSize if false allows you to set replica 1 - type: boolean - size: - description: Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type) - minimum: 0 - type: integer - subFailureDomain: - description: SubFailureDomain the name of the sub-failure domain - type: string - targetSizeRatio: - description: TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity - type: number - required: - - size - type: object - statusCheck: - description: The mirroring statusCheck - properties: - mirror: - description: HealthCheckSpec represents the health check of an object store bucket - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - status: - description: CephBlockPoolStatus represents the mirroring status of Ceph Storage Pool - properties: - conditions: - items: - description: Condition represents a status condition on any Rook-Ceph Custom Resource. - properties: - lastHeartbeatTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - description: ConditionReason is a reason for a condition - type: string - status: - type: string - type: - description: ConditionType represent a resource's status - type: string - type: object - type: array - info: - additionalProperties: - type: string - nullable: true - type: object - mirroringInfo: - description: MirroringInfoSpec is the status of the pool mirroring - properties: - details: - type: string - lastChanged: - type: string - lastChecked: - type: string - mode: - description: Mode is the mirroring mode - type: string - peers: - description: Peers are the list of peer sites connected to that cluster - items: - description: PeersSpec contains peer details - properties: - client_name: - description: ClientName is the CephX user used to connect to the peer - type: string - direction: - description: Direction is the peer mirroring direction - type: string - mirror_uuid: - description: MirrorUUID is the mirror UUID - type: string - site_name: - description: SiteName is the current site name - type: string - uuid: - description: UUID is the peer UUID - type: string - type: object - type: array - site_name: - description: SiteName is the current site name - type: string - type: object - mirroringStatus: - description: MirroringStatusSpec is the status of the pool mirroring - properties: - details: - description: Details contains potential status errors - type: string - lastChanged: - description: LastChanged is the last time time the status last changed - type: string - lastChecked: - description: LastChecked is the last time time the status was checked - type: string - summary: - description: Summary is the mirroring status summary - properties: - daemon_health: - description: DaemonHealth is the health of the mirroring daemon - type: string - health: - description: Health is the mirroring health - type: string - image_health: - description: ImageHealth is the health of the mirrored image - type: string - states: - description: States is the various state for all mirrored images - nullable: true - properties: - error: - description: Error is when the mirroring state is errored - type: integer - replaying: - description: Replaying is when the replay of the mirroring journal is on-going - type: integer - starting_replay: - description: StartingReplay is when the replay of the mirroring journal starts - type: integer - stopped: - description: Stopped is when the mirroring state is stopped - type: integer - stopping_replay: - description: StopReplaying is when the replay of the mirroring journal stops - type: integer - syncing: - description: Syncing is when the image is syncing - type: integer - unknown: - description: Unknown is when the mirroring state is unknown - type: integer - type: object - type: object - type: object - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - description: ConditionType represent a resource's status - type: string - snapshotScheduleStatus: - description: SnapshotScheduleStatusSpec is the status of the snapshot schedule - properties: - details: - description: Details contains potential status errors - type: string - lastChanged: - description: LastChanged is the last time time the status last changed - type: string - lastChecked: - description: LastChecked is the last time time the status was checked - type: string - snapshotSchedules: - description: SnapshotSchedules is the list of snapshots scheduled - items: - description: SnapshotSchedulesSpec is the list of snapshot scheduled for images in a pool - properties: - image: - description: Image is the mirrored image - type: string - items: - description: Items is the list schedules times for a given snapshot - items: - description: SnapshotSchedule is a schedule - properties: - interval: - description: Interval is the interval in which snapshots will be taken - type: string - start_time: - description: StartTime is the snapshot starting time - type: string - type: object - type: array - namespace: - description: Namespace is the RADOS namespace the image is part of - type: string - pool: - description: Pool is the pool name - type: string - type: object - nullable: true - type: array - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephbucketnotifications.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBucketNotification - listKind: CephBucketNotificationList - plural: cephbucketnotifications - singular: cephbucketnotification - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: CephBucketNotification represents a Bucket Notifications - 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: BucketNotificationSpec represent the spec of a Bucket Notification - properties: - events: - description: List of events that should trigger the notification - items: - description: BucketNotificationSpec represent the event type of the bucket notification - enum: - - s3:ObjectCreated:* - - s3:ObjectCreated:Put - - s3:ObjectCreated:Post - - s3:ObjectCreated:Copy - - s3:ObjectCreated:CompleteMultipartUpload - - s3:ObjectRemoved:* - - s3:ObjectRemoved:Delete - - s3:ObjectRemoved:DeleteMarkerCreated - type: string - type: array - filter: - description: Spec of notification filter - properties: - keyFilters: - description: Filters based on the object's key - items: - description: NotificationKeyFilterRule represent a single key rule in the Notification Filter spec - properties: - name: - description: Name of the filter - prefix/suffix/regex - enum: - - prefix - - suffix - - regex - type: string - value: - description: Value to filter on - type: string - required: - - name - - value - type: object - type: array - metadataFilters: - description: Filters based on the object's metadata - items: - description: NotificationFilterRule represent a single rule in the Notification Filter spec - properties: - name: - description: Name of the metadata or tag - minLength: 1 - type: string - value: - description: Value to filter on - type: string - required: - - name - - value - type: object - type: array - tagFilters: - description: Filters based on the object's tags - items: - description: NotificationFilterRule represent a single rule in the Notification Filter spec - properties: - name: - description: Name of the metadata or tag - minLength: 1 - type: string - value: - description: Value to filter on - type: string - required: - - name - - value - type: object - type: array - type: object - topic: - description: The name of the topic associated with this notification - minLength: 1 - type: string - required: - - topic - type: object - status: - description: Status represents the status of an object - properties: - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephbuckettopics.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephBucketTopic - listKind: CephBucketTopicList - plural: cephbuckettopics - singular: cephbuckettopic - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephBucketTopic represents a Ceph Object Topic for Bucket Notifications - 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: BucketTopicSpec represent the spec of a Bucket Topic - properties: - endpoint: - description: Contains the endpoint spec of the topic - properties: - amqp: - description: Spec of AMQP endpoint - properties: - ackLevel: - default: broker - description: The ack level required for this topic (none/broker/routeable) - enum: - - none - - broker - - routeable - type: string - disableVerifySSL: - description: Indicate whether the server certificate is validated by the client or not - type: boolean - exchange: - description: Name of the exchange that is used to route messages based on topics - minLength: 1 - type: string - uri: - description: The URI of the AMQP endpoint to push notification to - minLength: 1 - type: string - required: - - exchange - - uri - type: object - http: - description: Spec of HTTP endpoint - properties: - disableVerifySSL: - description: Indicate whether the server certificate is validated by the client or not - type: boolean - sendCloudEvents: - description: 'Send the notifications with the CloudEvents header: https://github.com/cloudevents/spec/blob/main/cloudevents/adapters/aws-s3.md Supported for Ceph Quincy (v17) or newer.' - type: boolean - uri: - description: The URI of the HTTP endpoint to push notification to - minLength: 1 - type: string - required: - - uri - type: object - kafka: - description: Spec of Kafka endpoint - properties: - ackLevel: - default: broker - description: The ack level required for this topic (none/broker) - enum: - - none - - broker - type: string - disableVerifySSL: - description: Indicate whether the server certificate is validated by the client or not - type: boolean - uri: - description: The URI of the Kafka endpoint to push notification to - minLength: 1 - type: string - useSSL: - description: Indicate whether to use SSL when communicating with the broker - type: boolean - required: - - uri - type: object - type: object - objectStoreName: - description: The name of the object store on which to define the topic - minLength: 1 - type: string - objectStoreNamespace: - description: The namespace of the object store on which to define the topic - minLength: 1 - type: string - opaqueData: - description: Data which is sent in each event - type: string - persistent: - description: Indication whether notifications to this endpoint are persistent or not - type: boolean - required: - - endpoint - - objectStoreName - - objectStoreNamespace - type: object - status: - description: BucketTopicStatus represents the Status of a CephBucketTopic - properties: - ARN: - description: The ARN of the topic generated by the RGW - nullable: true - type: string - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephclients.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephClient - listKind: CephClientList - plural: cephclients - singular: cephclient - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephClient represents a Ceph Client - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec represents the specification of a Ceph Client - properties: - caps: - additionalProperties: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - name: - type: string - required: - - caps - type: object - status: - description: Status represents the status of a Ceph Client - properties: - info: - additionalProperties: - type: string - nullable: true - type: object - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - description: ConditionType represent a resource's status - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephclusters.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephCluster - listKind: CephClusterList - plural: cephclusters - singular: cephcluster - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Directory used on the K8s nodes - jsonPath: .spec.dataDirHostPath - name: DataDirHostPath - type: string - - description: Number of MONs - jsonPath: .spec.mon.count - name: MonCount - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.phase - name: Phase - type: string - - description: Message - jsonPath: .status.message - name: Message - type: string - - description: Ceph Health - jsonPath: .status.ceph.health - name: Health - type: string - - jsonPath: .spec.external.enable - name: External - type: boolean - name: v1 - schema: - openAPIV3Schema: - description: CephCluster is a Ceph storage cluster - 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: ClusterSpec represents the specification of Ceph Cluster - properties: - annotations: - additionalProperties: - additionalProperties: - type: string - description: Annotations are annotations - type: object - description: The annotations-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - cephVersion: - description: The version information that instructs Rook to orchestrate a particular version of Ceph. - nullable: true - properties: - allowUnsupported: - description: Whether to allow unsupported versions (do not set to true in production) - type: boolean - image: - description: Image is the container image used to launch the ceph daemons, such as quay.io/ceph/ceph: The full list of images can be found at https://quay.io/repository/ceph/ceph?tab=tags - type: string - type: object - cleanupPolicy: - description: Indicates user intent when deleting a cluster; blocks orchestration and should not be set if cluster deletion is not imminent. - nullable: true - properties: - allowUninstallWithVolumes: - description: AllowUninstallWithVolumes defines whether we can proceed with the uninstall if they are RBD images still present - type: boolean - confirmation: - description: Confirmation represents the cleanup confirmation - nullable: true - pattern: ^$|^yes-really-destroy-data$ - type: string - sanitizeDisks: - description: SanitizeDisks represents way we sanitize disks - nullable: true - properties: - dataSource: - description: DataSource is the data source to use to sanitize the disk with - enum: - - zero - - random - type: string - iteration: - description: Iteration is the number of pass to apply the sanitizing - format: int32 - type: integer - method: - description: Method is the method we use to sanitize disks - enum: - - complete - - quick - type: string - type: object - type: object - continueUpgradeAfterChecksEvenIfNotHealthy: - description: ContinueUpgradeAfterChecksEvenIfNotHealthy defines if an upgrade should continue even if PGs are not clean - type: boolean - crashCollector: - description: A spec for the crash controller - nullable: true - properties: - daysToRetain: - description: DaysToRetain represents the number of days to retain crash until they get pruned - type: integer - disable: - description: Disable determines whether we should enable the crash collector - type: boolean - type: object - dashboard: - description: Dashboard settings - nullable: true - properties: - enabled: - description: Enabled determines whether to enable the dashboard - type: boolean - port: - description: Port is the dashboard webserver port - maximum: 65535 - minimum: 0 - type: integer - ssl: - description: SSL determines whether SSL should be used - type: boolean - urlPrefix: - description: URLPrefix is a prefix for all URLs to use the dashboard with a reverse proxy - type: string - type: object - dataDirHostPath: - description: The path on the host where config and data can be persisted - pattern: ^/(\S+) - type: string - disruptionManagement: - description: A spec for configuring disruption management. - nullable: true - properties: - machineDisruptionBudgetNamespace: - description: Namespace to look for MDBs by the machineDisruptionBudgetController - type: string - manageMachineDisruptionBudgets: - description: This enables management of machinedisruptionbudgets - type: boolean - managePodBudgets: - description: This enables management of poddisruptionbudgets - type: boolean - osdMaintenanceTimeout: - description: OSDMaintenanceTimeout sets how many additional minutes the DOWN/OUT interval is for drained failure domains it only works if managePodBudgets is true. the default is 30 minutes - format: int64 - type: integer - pgHealthCheckTimeout: - description: PGHealthCheckTimeout is the time (in minutes) that the operator will wait for the placement groups to become healthy (active+clean) after a drain was completed and OSDs came back up. Rook will continue with the next drain if the timeout exceeds. It only works if managePodBudgets is true. No values or 0 means that the operator will wait until the placement groups are healthy before unblocking the next drain. - format: int64 - type: integer - type: object - external: - description: Whether the Ceph Cluster is running external to this Kubernetes cluster mon, mgr, osd, mds, and discover daemons will not be created for external clusters. - nullable: true - properties: - enable: - description: Enable determines whether external mode is enabled or not - type: boolean - type: object - x-kubernetes-preserve-unknown-fields: true - healthCheck: - description: Internal daemon healthchecks and liveness probe - nullable: true - properties: - daemonHealth: - description: DaemonHealth is the health check for a given daemon - nullable: true - properties: - mon: - description: Monitor represents the health check settings for the Ceph monitor - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - osd: - description: ObjectStorageDaemon represents the health check settings for the Ceph OSDs - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - status: - description: Status represents the health check settings for the Ceph health - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - livenessProbe: - additionalProperties: - description: ProbeSpec is a wrapper around Probe so it can be enabled or disabled for a Ceph daemon - properties: - disabled: - description: Disabled determines whether probe is disable or not - type: boolean - probe: - description: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate. - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - type: object - description: LivenessProbe allows changing the livenessProbe configuration for a given daemon - type: object - startupProbe: - additionalProperties: - description: ProbeSpec is a wrapper around Probe so it can be enabled or disabled for a Ceph daemon - properties: - disabled: - description: Disabled determines whether probe is disable or not - type: boolean - probe: - description: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate. - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - type: object - description: StartupProbe allows changing the startupProbe configuration for a given daemon - type: object - type: object - labels: - additionalProperties: - additionalProperties: - type: string - description: Labels are label for a given daemons - type: object - description: The labels-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - logCollector: - description: Logging represents loggings settings - nullable: true - properties: - enabled: - description: Enabled represents whether the log collector is enabled - type: boolean - periodicity: - description: Periodicity is the periodicity of the log rotation - type: string - type: object - mgr: - description: A spec for mgr related options - nullable: true - properties: - allowMultiplePerNode: - description: AllowMultiplePerNode allows to run multiple managers on the same node (not recommended) - type: boolean - count: - description: Count is the number of manager to run - maximum: 2 - minimum: 0 - type: integer - modules: - description: Modules is the list of ceph manager modules to enable/disable - items: - description: Module represents mgr modules that the user wants to enable or disable - properties: - enabled: - description: Enabled determines whether a module should be enabled or not - type: boolean - name: - description: Name is the name of the ceph manager module - type: string - type: object - nullable: true - type: array - type: object - mon: - description: A spec for mon related options - nullable: true - properties: - allowMultiplePerNode: - description: AllowMultiplePerNode determines if we can run multiple monitors on the same node (not recommended) - type: boolean - count: - description: Count is the number of Ceph monitors - maximum: 9 - minimum: 0 - type: integer - stretchCluster: - description: StretchCluster is the stretch cluster specification - properties: - failureDomainLabel: - description: 'FailureDomainLabel the failure domain name (e,g: zone)' - type: string - subFailureDomain: - description: SubFailureDomain is the failure domain within a zone - type: string - zones: - description: Zones is the list of zones - items: - description: StretchClusterZoneSpec represents the specification of a stretched zone in a Ceph Cluster - properties: - arbiter: - description: Arbiter determines if the zone contains the arbiter - type: boolean - name: - description: Name is the name of the zone - type: string - volumeClaimTemplate: - description: VolumeClaimTemplate is the PVC template - 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: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. - type: string - type: object - status: - description: 'Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying volume. - type: object - conditions: - description: Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contails details about state of pvc - properties: - lastProbeTime: - description: Last time we probed the condition. - format: date-time - type: string - lastTransitionTime: - description: Last time the condition transitioned from one status to another. - format: date-time - type: string - message: - description: Human-readable message indicating details about last transition. - type: string - reason: - description: Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - phase: - description: Phase represents the current phase of PersistentVolumeClaim. - type: string - resizeStatus: - description: ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - nullable: true - type: array - type: object - volumeClaimTemplate: - description: VolumeClaimTemplate is the PVC definition - 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: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. - type: string - type: object - status: - description: 'Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying volume. - type: object - conditions: - description: Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contails details about state of pvc - properties: - lastProbeTime: - description: Last time we probed the condition. - format: date-time - type: string - lastTransitionTime: - description: Last time the condition transitioned from one status to another. - format: date-time - type: string - message: - description: Human-readable message indicating details about last transition. - type: string - reason: - description: Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - phase: - description: Phase represents the current phase of PersistentVolumeClaim. - type: string - resizeStatus: - description: ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - monitoring: - description: Prometheus based Monitoring settings - nullable: true - properties: - enabled: - description: Enabled determines whether to create the prometheus rules for the ceph cluster. If true, the prometheus types must exist or the creation will fail. - type: boolean - externalMgrEndpoints: - description: ExternalMgrEndpoints points to an existing Ceph prometheus exporter endpoint - items: - description: EndpointAddress is a tuple that describes single IP address. - properties: - hostname: - description: The Hostname of this endpoint - type: string - ip: - description: 'The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready. TODO: This should allow hostname or IP, See #4447.' - type: string - nodeName: - description: 'Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.' - type: string - targetRef: - description: Reference to object providing the endpoint. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - ip - type: object - nullable: true - type: array - externalMgrPrometheusPort: - description: ExternalMgrPrometheusPort Prometheus exporter port - maximum: 65535 - minimum: 0 - type: integer - type: object - network: - description: Network related configuration - nullable: true - properties: - connections: - description: Settings for network connections such as compression and encryption across the wire. - nullable: true - properties: - compression: - description: Compression settings for the network connections. - nullable: true - properties: - enabled: - description: Whether to compress the data in transit across the wire. The default is not set. Requires Ceph Quincy (v17) or newer. - type: boolean - type: object - encryption: - description: Encryption settings for the network connections. - nullable: true - properties: - enabled: - description: Whether to encrypt the data in transit across the wire to prevent eavesdropping the data on the network. The default is not set. Even if encryption is not enabled, clients still establish a strong initial authentication for the connection and data integrity is still validated with a crc check. When encryption is enabled, all communication between clients and Ceph daemons, or between Ceph daemons will be encrypted. - type: boolean - type: object - type: object - dualStack: - description: DualStack determines whether Ceph daemons should listen on both IPv4 and IPv6 - type: boolean - hostNetwork: - description: HostNetwork to enable host network - type: boolean - ipFamily: - description: IPFamily is the single stack IPv6 or IPv4 protocol - enum: - - IPv4 - - IPv6 - nullable: true - type: string - provider: - description: Provider is what provides network connectivity to the cluster e.g. "host" or "multus" - nullable: true - type: string - selectors: - additionalProperties: - type: string - description: Selectors string values describe what networks will be used to connect the cluster. Meanwhile the keys describe each network respective responsibilities or any metadata storage provider decide. - nullable: true - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - placement: - additionalProperties: - description: Placement is the placement for an object - properties: - nodeAffinity: - description: NodeAffinity is a group of node affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: PodAffinity is a group of inter pod affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: PodAntiAffinity is a group of inter pod anti affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - tolerations: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - maxSkew: - description: 'MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It''s a required field. Default value is 1 and 0 is not allowed.' - format: int32 - type: integer - topologyKey: - description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - description: The placement-related configuration to pass to kubernetes (affinity, node selector, tolerations). - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - priorityClassNames: - additionalProperties: - type: string - description: PriorityClassNames sets priority classes on components - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - removeOSDsIfOutAndSafeToRemove: - description: Remove the OSD that is out and safe to remove only if this option is true - type: boolean - resources: - additionalProperties: - description: ResourceRequirements describes the compute resource requirements. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - description: Resources set resource requests and limits - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - security: - description: Security represents security settings - nullable: true - properties: - kms: - description: KeyManagementService is the main Key Management option - nullable: true - properties: - connectionDetails: - additionalProperties: - type: string - description: ConnectionDetails contains the KMS connection details (address, port etc) - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - tokenSecretName: - description: TokenSecretName is the kubernetes secret containing the KMS token - type: string - type: object - type: object - skipUpgradeChecks: - description: SkipUpgradeChecks defines if an upgrade should be forced even if one of the check fails - type: boolean - storage: - description: A spec for available storage in the cluster and how it should be used - nullable: true - properties: - config: - additionalProperties: - type: string - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - deviceFilter: - description: A regular expression to allow more fine-grained selection of devices on nodes across the cluster - type: string - devicePathFilter: - description: A regular expression to allow more fine-grained selection of devices with path names - type: string - devices: - description: List of devices to use as storage devices - items: - description: Device represents a disk to use in the cluster - properties: - config: - additionalProperties: - type: string - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - fullpath: - type: string - name: - type: string - type: object - nullable: true - type: array - x-kubernetes-preserve-unknown-fields: true - nodes: - items: - description: Node is a storage nodes - properties: - config: - additionalProperties: - type: string - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - deviceFilter: - description: A regular expression to allow more fine-grained selection of devices on nodes across the cluster - type: string - devicePathFilter: - description: A regular expression to allow more fine-grained selection of devices with path names - type: string - devices: - description: List of devices to use as storage devices - items: - description: Device represents a disk to use in the cluster - properties: - config: - additionalProperties: - type: string - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - fullpath: - type: string - name: - type: string - type: object - nullable: true - type: array - x-kubernetes-preserve-unknown-fields: true - name: - type: string - resources: - description: ResourceRequirements describes the compute resource requirements. - nullable: true - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - useAllDevices: - description: Whether to consume all the storage devices found on a machine - type: boolean - volumeClaimTemplates: - description: PersistentVolumeClaims to use as storage - items: - description: PersistentVolumeClaim is a user's request for and claim to a persistent volume - 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: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. - type: string - type: object - status: - description: 'Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying volume. - type: object - conditions: - description: Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contails details about state of pvc - properties: - lastProbeTime: - description: Last time we probed the condition. - format: date-time - type: string - lastTransitionTime: - description: Last time the condition transitioned from one status to another. - format: date-time - type: string - message: - description: Human-readable message indicating details about last transition. - type: string - reason: - description: Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - phase: - description: Phase represents the current phase of PersistentVolumeClaim. - type: string - resizeStatus: - description: ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: string - type: object - type: object - type: array - type: object - nullable: true - type: array - onlyApplyOSDPlacement: - type: boolean - storageClassDeviceSets: - items: - description: StorageClassDeviceSet is a storage class device set - properties: - config: - additionalProperties: - type: string - description: Provider-specific device configuration - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - count: - description: Count is the number of devices in this set - minimum: 1 - type: integer - encrypted: - description: Whether to encrypt the deviceSet - type: boolean - name: - description: Name is a unique identifier for the set - type: string - placement: - description: Placement is the placement for an object - nullable: true - properties: - nodeAffinity: - description: NodeAffinity is a group of node affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: PodAffinity is a group of inter pod affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: PodAntiAffinity is a group of inter pod anti affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - tolerations: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - maxSkew: - description: 'MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It''s a required field. Default value is 1 and 0 is not allowed.' - format: int32 - type: integer - topologyKey: - description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - portable: - description: Portable represents OSD portability across the hosts - type: boolean - preparePlacement: - description: Placement is the placement for an object - nullable: true - properties: - nodeAffinity: - description: NodeAffinity is a group of node affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: PodAffinity is a group of inter pod affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: PodAntiAffinity is a group of inter pod anti affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - tolerations: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - maxSkew: - description: 'MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It''s a required field. Default value is 1 and 0 is not allowed.' - format: int32 - type: integer - topologyKey: - description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - resources: - description: ResourceRequirements describes the compute resource requirements. - nullable: true - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - schedulerName: - description: Scheduler name for OSD pod placement - type: string - tuneDeviceClass: - description: TuneSlowDeviceClass Tune the OSD when running on a slow Device Class - type: boolean - tuneFastDeviceClass: - description: TuneFastDeviceClass Tune the OSD when running on a fast Device Class - type: boolean - volumeClaimTemplates: - description: VolumeClaimTemplates is a list of PVC templates for the underlying storage devices - items: - description: PersistentVolumeClaim is a user's request for and claim to a persistent volume - 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: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. - type: string - type: object - status: - description: 'Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying volume. - type: object - conditions: - description: Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contails details about state of pvc - properties: - lastProbeTime: - description: Last time we probed the condition. - format: date-time - type: string - lastTransitionTime: - description: Last time the condition transitioned from one status to another. - format: date-time - type: string - message: - description: Human-readable message indicating details about last transition. - type: string - reason: - description: Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - phase: - description: Phase represents the current phase of PersistentVolumeClaim. - type: string - resizeStatus: - description: ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: string - type: object - type: object - type: array - required: - - count - - name - - volumeClaimTemplates - type: object - nullable: true - type: array - useAllDevices: - description: Whether to consume all the storage devices found on a machine - type: boolean - useAllNodes: - type: boolean - volumeClaimTemplates: - description: PersistentVolumeClaims to use as storage - items: - description: PersistentVolumeClaim is a user's request for and claim to a persistent volume - 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: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. - type: string - type: object - status: - description: 'Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying volume. - type: object - conditions: - description: Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contails details about state of pvc - properties: - lastProbeTime: - description: Last time we probed the condition. - format: date-time - type: string - lastTransitionTime: - description: Last time the condition transitioned from one status to another. - format: date-time - type: string - message: - description: Human-readable message indicating details about last transition. - type: string - reason: - description: Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - phase: - description: Phase represents the current phase of PersistentVolumeClaim. - type: string - resizeStatus: - description: ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: string - type: object - type: object - type: array - type: object - waitTimeoutForHealthyOSDInMinutes: - description: WaitTimeoutForHealthyOSDInMinutes defines the time the operator would wait before an OSD can be stopped for upgrade or restart. If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then operator would continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`. The default wait timeout is 10 minutes. - format: int64 - type: integer - type: object - status: - description: ClusterStatus represents the status of a Ceph cluster - nullable: true - properties: - ceph: - description: CephStatus is the details health of a Ceph Cluster - properties: - capacity: - description: Capacity is the capacity information of a Ceph Cluster - properties: - bytesAvailable: - format: int64 - type: integer - bytesTotal: - format: int64 - type: integer - bytesUsed: - format: int64 - type: integer - lastUpdated: - type: string - type: object - details: - additionalProperties: - description: CephHealthMessage represents the health message of a Ceph Cluster - properties: - message: - type: string - severity: - type: string - required: - - message - - severity - type: object - type: object - fsid: - type: string - health: - type: string - lastChanged: - type: string - lastChecked: - type: string - previousHealth: - type: string - versions: - description: CephDaemonsVersions show the current ceph version for different ceph daemons - properties: - cephfs-mirror: - additionalProperties: - type: integer - description: CephFSMirror shows CephFSMirror Ceph version - type: object - mds: - additionalProperties: - type: integer - description: Mds shows Mds Ceph version - type: object - mgr: - additionalProperties: - type: integer - description: Mgr shows Mgr Ceph version - type: object - mon: - additionalProperties: - type: integer - description: Mon shows Mon Ceph version - type: object - osd: - additionalProperties: - type: integer - description: Osd shows Osd Ceph version - type: object - overall: - additionalProperties: - type: integer - description: Overall shows overall Ceph version - type: object - rbd-mirror: - additionalProperties: - type: integer - description: RbdMirror shows RbdMirror Ceph version - type: object - rgw: - additionalProperties: - type: integer - description: Rgw shows Rgw Ceph version - type: object - type: object - type: object - conditions: - items: - description: Condition represents a status condition on any Rook-Ceph Custom Resource. - properties: - lastHeartbeatTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - description: ConditionReason is a reason for a condition - type: string - status: - type: string - type: - description: ConditionType represent a resource's status - type: string - type: object - type: array - message: - type: string - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - description: ConditionType represent a resource's status - type: string - state: - description: ClusterState represents the state of a Ceph Cluster - type: string - storage: - description: CephStorage represents flavors of Ceph Cluster Storage - properties: - deviceClasses: - items: - description: DeviceClasses represents device classes of a Ceph Cluster - properties: - name: - type: string - type: object - type: array - type: object - version: - description: ClusterVersion represents the version of a Ceph Cluster - properties: - image: - type: string - version: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephfilesystemmirrors.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystemMirror - listKind: CephFilesystemMirrorList - plural: cephfilesystemmirrors - singular: cephfilesystemmirror - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephFilesystemMirror is the Ceph Filesystem Mirror object definition - 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: FilesystemMirroringSpec is the filesystem mirroring specification - properties: - annotations: - additionalProperties: - type: string - description: The annotations-related configuration to add/set on each Pod related object. - nullable: true - type: object - labels: - additionalProperties: - type: string - description: The labels-related configuration to add/set on each Pod related object. - nullable: true - type: object - placement: - description: The affinity to place the rgw pods (default is to place on any available node) - nullable: true - properties: - nodeAffinity: - description: NodeAffinity is a group of node affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: PodAffinity is a group of inter pod affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: PodAntiAffinity is a group of inter pod anti affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - tolerations: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - maxSkew: - description: 'MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It''s a required field. Default value is 1 and 0 is not allowed.' - format: int32 - type: integer - topologyKey: - description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - priorityClassName: - description: PriorityClassName sets priority class on the cephfs-mirror pods - type: string - resources: - description: The resource requirements for the cephfs-mirror pods - nullable: true - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - type: object - status: - description: Status represents the status of an object - properties: - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephfilesystems.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystem - listKind: CephFilesystemList - plural: cephfilesystems - singular: cephfilesystem - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Number of desired active MDS daemons - jsonPath: .spec.metadataServer.activeCount - name: ActiveMDS - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephFilesystem represents a Ceph Filesystem - 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: FilesystemSpec represents the spec of a file system - properties: - dataPools: - description: The data pool settings, with optional predefined pool name. - items: - description: NamedPoolSpec represents the named ceph pool spec - properties: - compressionMode: - description: 'DEPRECATED: use Parameters instead, e.g., Parameters["compression_mode"] = "force" The inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force) Do NOT set a default value for kubebuilder as this will override the Parameters' - enum: - - none - - passive - - aggressive - - force - - "" - nullable: true - type: string - crushRoot: - description: The root of the crush hierarchy utilized by the pool - nullable: true - type: string - deviceClass: - description: The device class the OSD should set to for use in the pool - nullable: true - type: string - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool - type: boolean - erasureCoded: - description: The erasure code settings - properties: - algorithm: - description: The algorithm for erasure coding - type: string - codingChunks: - description: Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type). This is the number of OSDs that can be lost simultaneously before data cannot be recovered. - minimum: 0 - type: integer - dataChunks: - description: Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type). The number of chunks required to recover an object when any single OSD is lost is the same as dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery. - minimum: 0 - type: integer - required: - - codingChunks - - dataChunks - type: object - failureDomain: - description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map' - type: string - mirroring: - description: The mirroring settings - properties: - enabled: - description: Enabled whether this pool is mirrored or not - type: boolean - mode: - description: 'Mode is the mirroring mode: either pool or image' - type: string - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - snapshotSchedules: - description: SnapshotSchedules is the scheduling of snapshot for mirrored images/pools - items: - description: SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool - properties: - interval: - description: Interval represent the periodicity of the snapshot. - type: string - path: - description: Path is the path to snapshot, only valid for CephFS - type: string - startTime: - description: StartTime indicates when to start the snapshot - type: string - type: object - type: array - type: object - name: - description: Name of the pool - type: string - parameters: - additionalProperties: - type: string - description: Parameters is a list of properties to enable on a given pool - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - quotas: - description: The quota settings - nullable: true - properties: - maxBytes: - description: MaxBytes represents the quota in bytes Deprecated in favor of MaxSize - format: int64 - type: integer - maxObjects: - description: MaxObjects represents the quota in objects - format: int64 - type: integer - maxSize: - description: MaxSize represents the quota in bytes as a string - pattern: ^[0-9]+[\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$ - type: string - type: object - replicated: - description: The replication settings - properties: - hybridStorage: - description: HybridStorage represents hybrid storage tier settings - nullable: true - properties: - primaryDeviceClass: - description: PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD - minLength: 1 - type: string - secondaryDeviceClass: - description: SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs - minLength: 1 - type: string - required: - - primaryDeviceClass - - secondaryDeviceClass - type: object - replicasPerFailureDomain: - description: ReplicasPerFailureDomain the number of replica in the specified failure domain - minimum: 1 - type: integer - requireSafeReplicaSize: - description: RequireSafeReplicaSize if false allows you to set replica 1 - type: boolean - size: - description: Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type) - minimum: 0 - type: integer - subFailureDomain: - description: SubFailureDomain the name of the sub-failure domain - type: string - targetSizeRatio: - description: TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity - type: number - required: - - size - type: object - statusCheck: - description: The mirroring statusCheck - properties: - mirror: - description: HealthCheckSpec represents the health check of an object store bucket - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - nullable: true - type: array - metadataPool: - description: The metadata pool settings - nullable: true - properties: - compressionMode: - description: 'DEPRECATED: use Parameters instead, e.g., Parameters["compression_mode"] = "force" The inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force) Do NOT set a default value for kubebuilder as this will override the Parameters' - enum: - - none - - passive - - aggressive - - force - - "" - nullable: true - type: string - crushRoot: - description: The root of the crush hierarchy utilized by the pool - nullable: true - type: string - deviceClass: - description: The device class the OSD should set to for use in the pool - nullable: true - type: string - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool - type: boolean - erasureCoded: - description: The erasure code settings - properties: - algorithm: - description: The algorithm for erasure coding - type: string - codingChunks: - description: Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type). This is the number of OSDs that can be lost simultaneously before data cannot be recovered. - minimum: 0 - type: integer - dataChunks: - description: Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type). The number of chunks required to recover an object when any single OSD is lost is the same as dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery. - minimum: 0 - type: integer - required: - - codingChunks - - dataChunks - type: object - failureDomain: - description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map' - type: string - mirroring: - description: The mirroring settings - properties: - enabled: - description: Enabled whether this pool is mirrored or not - type: boolean - mode: - description: 'Mode is the mirroring mode: either pool or image' - type: string - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - snapshotSchedules: - description: SnapshotSchedules is the scheduling of snapshot for mirrored images/pools - items: - description: SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool - properties: - interval: - description: Interval represent the periodicity of the snapshot. - type: string - path: - description: Path is the path to snapshot, only valid for CephFS - type: string - startTime: - description: StartTime indicates when to start the snapshot - type: string - type: object - type: array - type: object - parameters: - additionalProperties: - type: string - description: Parameters is a list of properties to enable on a given pool - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - quotas: - description: The quota settings - nullable: true - properties: - maxBytes: - description: MaxBytes represents the quota in bytes Deprecated in favor of MaxSize - format: int64 - type: integer - maxObjects: - description: MaxObjects represents the quota in objects - format: int64 - type: integer - maxSize: - description: MaxSize represents the quota in bytes as a string - pattern: ^[0-9]+[\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$ - type: string - type: object - replicated: - description: The replication settings - properties: - hybridStorage: - description: HybridStorage represents hybrid storage tier settings - nullable: true - properties: - primaryDeviceClass: - description: PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD - minLength: 1 - type: string - secondaryDeviceClass: - description: SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs - minLength: 1 - type: string - required: - - primaryDeviceClass - - secondaryDeviceClass - type: object - replicasPerFailureDomain: - description: ReplicasPerFailureDomain the number of replica in the specified failure domain - minimum: 1 - type: integer - requireSafeReplicaSize: - description: RequireSafeReplicaSize if false allows you to set replica 1 - type: boolean - size: - description: Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type) - minimum: 0 - type: integer - subFailureDomain: - description: SubFailureDomain the name of the sub-failure domain - type: string - targetSizeRatio: - description: TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity - type: number - required: - - size - type: object - statusCheck: - description: The mirroring statusCheck - properties: - mirror: - description: HealthCheckSpec represents the health check of an object store bucket - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - metadataServer: - description: The mds pod info - properties: - activeCount: - description: The number of metadata servers that are active. The remaining servers in the cluster will be in standby mode. - format: int32 - maximum: 10 - minimum: 1 - type: integer - activeStandby: - description: Whether each active MDS instance will have an active standby with a warm metadata cache for faster failover. If false, standbys will still be available, but will not have a warm metadata cache. - type: boolean - annotations: - additionalProperties: - type: string - description: The annotations-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: The labels-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - livenessProbe: - description: ProbeSpec is a wrapper around Probe so it can be enabled or disabled for a Ceph daemon - properties: - disabled: - description: Disabled determines whether probe is disable or not - type: boolean - probe: - description: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate. - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - type: object - placement: - description: The affinity to place the mds pods (default is to place on all available node) with a daemonset - nullable: true - properties: - nodeAffinity: - description: NodeAffinity is a group of node affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: PodAffinity is a group of inter pod affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: PodAntiAffinity is a group of inter pod anti affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - tolerations: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - maxSkew: - description: 'MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It''s a required field. Default value is 1 and 0 is not allowed.' - format: int32 - type: integer - topologyKey: - description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - priorityClassName: - description: PriorityClassName sets priority classes on components - type: string - resources: - description: The resource requirements for the rgw pods - nullable: true - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - startupProbe: - description: ProbeSpec is a wrapper around Probe so it can be enabled or disabled for a Ceph daemon - properties: - disabled: - description: Disabled determines whether probe is disable or not - type: boolean - probe: - description: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate. - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - type: object - required: - - activeCount - type: object - mirroring: - description: The mirroring settings - nullable: true - properties: - enabled: - description: Enabled whether this filesystem is mirrored or not - type: boolean - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - snapshotRetention: - description: Retention is the retention policy for a snapshot schedule One path has exactly one retention policy. A policy can however contain multiple count-time period pairs in order to specify complex retention policies - items: - description: SnapshotScheduleRetentionSpec is a retention policy - properties: - duration: - description: Duration represents the retention duration for a snapshot - type: string - path: - description: Path is the path to snapshot - type: string - type: object - type: array - snapshotSchedules: - description: SnapshotSchedules is the scheduling of snapshot for mirrored filesystems - items: - description: SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool - properties: - interval: - description: Interval represent the periodicity of the snapshot. - type: string - path: - description: Path is the path to snapshot, only valid for CephFS - type: string - startTime: - description: StartTime indicates when to start the snapshot - type: string - type: object - type: array - type: object - preserveFilesystemOnDelete: - description: Preserve the fs in the cluster on CephFilesystem CR deletion. Setting this to true automatically implies PreservePoolsOnDelete is true. - type: boolean - preservePoolsOnDelete: - description: Preserve pools on filesystem deletion - type: boolean - statusCheck: - description: The mirroring statusCheck - properties: - mirror: - description: HealthCheckSpec represents the health check of an object store bucket - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - dataPools - - metadataPool - - metadataServer - type: object - status: - description: CephFilesystemStatus represents the status of a Ceph Filesystem - properties: - conditions: - items: - description: Condition represents a status condition on any Rook-Ceph Custom Resource. - properties: - lastHeartbeatTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - description: ConditionReason is a reason for a condition - type: string - status: - type: string - type: - description: ConditionType represent a resource's status - type: string - type: object - type: array - info: - additionalProperties: - type: string - description: Use only info and put mirroringStatus in it? - nullable: true - type: object - mirroringStatus: - description: MirroringStatus is the filesystem mirroring status - properties: - daemonsStatus: - description: PoolMirroringStatus is the mirroring status of a filesystem - items: - description: FilesystemMirrorInfoSpec is the filesystem mirror status of a given filesystem - properties: - daemon_id: - description: DaemonID is the cephfs-mirror name - type: integer - filesystems: - description: Filesystems is the list of filesystems managed by a given cephfs-mirror daemon - items: - description: FilesystemsSpec is spec for the mirrored filesystem - properties: - directory_count: - description: DirectoryCount is the number of directories in the filesystem - type: integer - filesystem_id: - description: FilesystemID is the filesystem identifier - type: integer - name: - description: Name is name of the filesystem - type: string - peers: - description: Peers represents the mirroring peers - items: - description: FilesystemMirrorInfoPeerSpec is the specification of a filesystem peer mirror - properties: - remote: - description: Remote are the remote cluster information - properties: - client_name: - description: ClientName is cephx name - type: string - cluster_name: - description: ClusterName is the name of the cluster - type: string - fs_name: - description: FsName is the filesystem name - type: string - type: object - stats: - description: Stats are the stat a peer mirror - properties: - failure_count: - description: FailureCount is the number of mirroring failure - type: integer - recovery_count: - description: RecoveryCount is the number of recovery attempted after failures - type: integer - type: object - uuid: - description: UUID is the peer unique identifier - type: string - type: object - type: array - type: object - type: array - type: object - nullable: true - type: array - details: - description: Details contains potential status errors - type: string - lastChanged: - description: LastChanged is the last time time the status last changed - type: string - lastChecked: - description: LastChecked is the last time time the status was checked - type: string - type: object - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - description: ConditionType represent a resource's status - type: string - snapshotScheduleStatus: - description: FilesystemSnapshotScheduleStatusSpec is the status of the snapshot schedule - properties: - details: - description: Details contains potential status errors - type: string - lastChanged: - description: LastChanged is the last time time the status last changed - type: string - lastChecked: - description: LastChecked is the last time time the status was checked - type: string - snapshotSchedules: - description: SnapshotSchedules is the list of snapshots scheduled - items: - description: FilesystemSnapshotSchedulesSpec is the list of snapshot scheduled for images in a pool - properties: - fs: - description: Fs is the name of the Ceph Filesystem - type: string - path: - description: Path is the path on the filesystem - type: string - rel_path: - type: string - retention: - description: FilesystemSnapshotScheduleStatusRetention is the retention specification for a filesystem snapshot schedule - properties: - active: - description: Active is whether the scheduled is active or not - type: boolean - created: - description: Created is when the snapshot schedule was created - type: string - created_count: - description: CreatedCount is total amount of snapshots - type: integer - first: - description: First is when the first snapshot schedule was taken - type: string - last: - description: Last is when the last snapshot schedule was taken - type: string - last_pruned: - description: LastPruned is when the last snapshot schedule was pruned - type: string - pruned_count: - description: PrunedCount is total amount of pruned snapshots - type: integer - start: - description: Start is when the snapshot schedule starts - type: string - type: object - schedule: - type: string - subvol: - description: Subvol is the name of the sub volume - type: string - type: object - nullable: true - type: array - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephfilesystemsubvolumegroups.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephFilesystemSubVolumeGroup - listKind: CephFilesystemSubVolumeGroupList - plural: cephfilesystemsubvolumegroups - singular: cephfilesystemsubvolumegroup - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephFilesystemSubVolumeGroup represents a Ceph Filesystem SubVolumeGroup - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec represents the specification of a Ceph Filesystem SubVolumeGroup - properties: - filesystemName: - description: FilesystemName is the name of Ceph Filesystem SubVolumeGroup volume name. Typically it's the name of the CephFilesystem CR. If not coming from the CephFilesystem CR, it can be retrieved from the list of Ceph Filesystem volumes with `ceph fs volume ls`. To learn more about Ceph Filesystem abstractions see https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes - type: string - required: - - filesystemName - type: object - status: - description: Status represents the status of a CephFilesystem SubvolumeGroup - properties: - info: - additionalProperties: - type: string - nullable: true - type: object - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - description: ConditionType represent a resource's status - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephnfses.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephNFS - listKind: CephNFSList - plural: cephnfses - shortNames: - - nfs - singular: cephnfs - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: CephNFS represents a Ceph NFS - 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: NFSGaneshaSpec represents the spec of an nfs ganesha server - properties: - rados: - description: RADOS is the Ganesha RADOS specification - nullable: true - properties: - namespace: - description: The namespace inside the Ceph pool (set by 'pool') where shared NFS-Ganesha config is stored. This setting is required for Ceph v15 and ignored for Ceph v16. As of Ceph Pacific v16+, this is internally set to the name of the CephNFS. - type: string - pool: - description: The Ceph pool used store the shared configuration for NFS-Ganesha daemons. This setting is required for Ceph v15 and ignored for Ceph v16. As of Ceph Pacific 16.2.7+, this is internally hardcoded to ".nfs". - type: string - type: object - server: - description: Server is the Ganesha Server specification - properties: - active: - description: The number of active Ganesha servers - type: integer - annotations: - additionalProperties: - type: string - description: The annotations-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: The labels-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - logLevel: - description: LogLevel set logging level - type: string - placement: - description: The affinity to place the ganesha pods - nullable: true - properties: - nodeAffinity: - description: NodeAffinity is a group of node affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: PodAffinity is a group of inter pod affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: PodAntiAffinity is a group of inter pod anti affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - tolerations: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - maxSkew: - description: 'MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It''s a required field. Default value is 1 and 0 is not allowed.' - format: int32 - type: integer - topologyKey: - description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - priorityClassName: - description: PriorityClassName sets the priority class on the pods - type: string - resources: - description: Resources set resource requests and limits - nullable: true - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - active - type: object - required: - - server - type: object - status: - description: Status represents the status of an object - properties: - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephobjectrealms.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectRealm - listKind: CephObjectRealmList - plural: cephobjectrealms - singular: cephobjectrealm - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: CephObjectRealm represents a Ceph Object Store Gateway Realm - 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: ObjectRealmSpec represent the spec of an ObjectRealm - nullable: true - properties: - pull: - description: PullSpec represents the pulling specification of a Ceph Object Storage Gateway Realm - properties: - endpoint: - pattern: ^https*:// - type: string - type: object - type: object - status: - description: Status represents the status of an object - properties: - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephobjectstores.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStore - listKind: CephObjectStoreList - plural: cephobjectstores - singular: cephobjectstore - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephObjectStore represents a Ceph Object Store Gateway - 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: ObjectStoreSpec represent the spec of a pool - properties: - dataPool: - description: The data pool settings - nullable: true - properties: - compressionMode: - description: 'DEPRECATED: use Parameters instead, e.g., Parameters["compression_mode"] = "force" The inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force) Do NOT set a default value for kubebuilder as this will override the Parameters' - enum: - - none - - passive - - aggressive - - force - - "" - nullable: true - type: string - crushRoot: - description: The root of the crush hierarchy utilized by the pool - nullable: true - type: string - deviceClass: - description: The device class the OSD should set to for use in the pool - nullable: true - type: string - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool - type: boolean - erasureCoded: - description: The erasure code settings - properties: - algorithm: - description: The algorithm for erasure coding - type: string - codingChunks: - description: Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type). This is the number of OSDs that can be lost simultaneously before data cannot be recovered. - minimum: 0 - type: integer - dataChunks: - description: Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type). The number of chunks required to recover an object when any single OSD is lost is the same as dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery. - minimum: 0 - type: integer - required: - - codingChunks - - dataChunks - type: object - failureDomain: - description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map' - type: string - mirroring: - description: The mirroring settings - properties: - enabled: - description: Enabled whether this pool is mirrored or not - type: boolean - mode: - description: 'Mode is the mirroring mode: either pool or image' - type: string - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - snapshotSchedules: - description: SnapshotSchedules is the scheduling of snapshot for mirrored images/pools - items: - description: SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool - properties: - interval: - description: Interval represent the periodicity of the snapshot. - type: string - path: - description: Path is the path to snapshot, only valid for CephFS - type: string - startTime: - description: StartTime indicates when to start the snapshot - type: string - type: object - type: array - type: object - parameters: - additionalProperties: - type: string - description: Parameters is a list of properties to enable on a given pool - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - quotas: - description: The quota settings - nullable: true - properties: - maxBytes: - description: MaxBytes represents the quota in bytes Deprecated in favor of MaxSize - format: int64 - type: integer - maxObjects: - description: MaxObjects represents the quota in objects - format: int64 - type: integer - maxSize: - description: MaxSize represents the quota in bytes as a string - pattern: ^[0-9]+[\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$ - type: string - type: object - replicated: - description: The replication settings - properties: - hybridStorage: - description: HybridStorage represents hybrid storage tier settings - nullable: true - properties: - primaryDeviceClass: - description: PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD - minLength: 1 - type: string - secondaryDeviceClass: - description: SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs - minLength: 1 - type: string - required: - - primaryDeviceClass - - secondaryDeviceClass - type: object - replicasPerFailureDomain: - description: ReplicasPerFailureDomain the number of replica in the specified failure domain - minimum: 1 - type: integer - requireSafeReplicaSize: - description: RequireSafeReplicaSize if false allows you to set replica 1 - type: boolean - size: - description: Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type) - minimum: 0 - type: integer - subFailureDomain: - description: SubFailureDomain the name of the sub-failure domain - type: string - targetSizeRatio: - description: TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity - type: number - required: - - size - type: object - statusCheck: - description: The mirroring statusCheck - properties: - mirror: - description: HealthCheckSpec represents the health check of an object store bucket - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - gateway: - description: The rgw pod info - nullable: true - properties: - annotations: - additionalProperties: - type: string - description: The annotations-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - caBundleRef: - description: The name of the secret that stores custom ca-bundle with root and intermediate certificates. - nullable: true - type: string - externalRgwEndpoints: - description: ExternalRgwEndpoints points to external rgw endpoint(s) - items: - description: EndpointAddress is a tuple that describes single IP address. - properties: - hostname: - description: The Hostname of this endpoint - type: string - ip: - description: 'The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready. TODO: This should allow hostname or IP, See #4447.' - type: string - nodeName: - description: 'Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.' - type: string - targetRef: - description: Reference to object providing the endpoint. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - ip - type: object - nullable: true - type: array - instances: - description: The number of pods in the rgw replicaset. - format: int32 - nullable: true - type: integer - labels: - additionalProperties: - type: string - description: The labels-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - placement: - description: The affinity to place the rgw pods (default is to place on any available node) - nullable: true - properties: - nodeAffinity: - description: NodeAffinity is a group of node affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: PodAffinity is a group of inter pod affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: PodAntiAffinity is a group of inter pod anti affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - tolerations: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - maxSkew: - description: 'MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It''s a required field. Default value is 1 and 0 is not allowed.' - format: int32 - type: integer - topologyKey: - description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - port: - description: The port the rgw service will be listening on (http) - format: int32 - type: integer - priorityClassName: - description: PriorityClassName sets priority classes on the rgw pods - type: string - resources: - description: The resource requirements for the rgw pods - nullable: true - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - securePort: - description: The port the rgw service will be listening on (https) - format: int32 - maximum: 65535 - minimum: 0 - nullable: true - type: integer - service: - description: The configuration related to add/set on each rgw service. - nullable: true - properties: - annotations: - additionalProperties: - type: string - description: The annotations-related configuration to add/set on each rgw service. nullable optional - type: object - type: object - sslCertificateRef: - description: The name of the secret that stores the ssl certificate for secure rgw connections - nullable: true - type: string - type: object - healthCheck: - description: The rgw Bucket healthchecks and liveness probe - nullable: true - properties: - bucket: - description: HealthCheckSpec represents the health check of an object store bucket - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - livenessProbe: - description: ProbeSpec is a wrapper around Probe so it can be enabled or disabled for a Ceph daemon - properties: - disabled: - description: Disabled determines whether probe is disable or not - type: boolean - probe: - description: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate. - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - type: object - readinessProbe: - description: ProbeSpec is a wrapper around Probe so it can be enabled or disabled for a Ceph daemon - properties: - disabled: - description: Disabled determines whether probe is disable or not - type: boolean - probe: - description: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate. - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - type: object - startupProbe: - description: ProbeSpec is a wrapper around Probe so it can be enabled or disabled for a Ceph daemon - properties: - disabled: - description: Disabled determines whether probe is disable or not - type: boolean - probe: - description: Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate. - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - type: object - type: object - metadataPool: - description: The metadata pool settings - nullable: true - properties: - compressionMode: - description: 'DEPRECATED: use Parameters instead, e.g., Parameters["compression_mode"] = "force" The inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force) Do NOT set a default value for kubebuilder as this will override the Parameters' - enum: - - none - - passive - - aggressive - - force - - "" - nullable: true - type: string - crushRoot: - description: The root of the crush hierarchy utilized by the pool - nullable: true - type: string - deviceClass: - description: The device class the OSD should set to for use in the pool - nullable: true - type: string - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool - type: boolean - erasureCoded: - description: The erasure code settings - properties: - algorithm: - description: The algorithm for erasure coding - type: string - codingChunks: - description: Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type). This is the number of OSDs that can be lost simultaneously before data cannot be recovered. - minimum: 0 - type: integer - dataChunks: - description: Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type). The number of chunks required to recover an object when any single OSD is lost is the same as dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery. - minimum: 0 - type: integer - required: - - codingChunks - - dataChunks - type: object - failureDomain: - description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map' - type: string - mirroring: - description: The mirroring settings - properties: - enabled: - description: Enabled whether this pool is mirrored or not - type: boolean - mode: - description: 'Mode is the mirroring mode: either pool or image' - type: string - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - snapshotSchedules: - description: SnapshotSchedules is the scheduling of snapshot for mirrored images/pools - items: - description: SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool - properties: - interval: - description: Interval represent the periodicity of the snapshot. - type: string - path: - description: Path is the path to snapshot, only valid for CephFS - type: string - startTime: - description: StartTime indicates when to start the snapshot - type: string - type: object - type: array - type: object - parameters: - additionalProperties: - type: string - description: Parameters is a list of properties to enable on a given pool - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - quotas: - description: The quota settings - nullable: true - properties: - maxBytes: - description: MaxBytes represents the quota in bytes Deprecated in favor of MaxSize - format: int64 - type: integer - maxObjects: - description: MaxObjects represents the quota in objects - format: int64 - type: integer - maxSize: - description: MaxSize represents the quota in bytes as a string - pattern: ^[0-9]+[\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$ - type: string - type: object - replicated: - description: The replication settings - properties: - hybridStorage: - description: HybridStorage represents hybrid storage tier settings - nullable: true - properties: - primaryDeviceClass: - description: PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD - minLength: 1 - type: string - secondaryDeviceClass: - description: SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs - minLength: 1 - type: string - required: - - primaryDeviceClass - - secondaryDeviceClass - type: object - replicasPerFailureDomain: - description: ReplicasPerFailureDomain the number of replica in the specified failure domain - minimum: 1 - type: integer - requireSafeReplicaSize: - description: RequireSafeReplicaSize if false allows you to set replica 1 - type: boolean - size: - description: Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type) - minimum: 0 - type: integer - subFailureDomain: - description: SubFailureDomain the name of the sub-failure domain - type: string - targetSizeRatio: - description: TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity - type: number - required: - - size - type: object - statusCheck: - description: The mirroring statusCheck - properties: - mirror: - description: HealthCheckSpec represents the health check of an object store bucket - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - preservePoolsOnDelete: - description: Preserve pools on object store deletion - type: boolean - security: - description: Security represents security settings - nullable: true - properties: - kms: - description: KeyManagementService is the main Key Management option - nullable: true - properties: - connectionDetails: - additionalProperties: - type: string - description: ConnectionDetails contains the KMS connection details (address, port etc) - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - tokenSecretName: - description: TokenSecretName is the kubernetes secret containing the KMS token - type: string - type: object - type: object - zone: - description: The multisite info - nullable: true - properties: - name: - description: RGW Zone the Object Store is in - type: string - required: - - name - type: object - type: object - status: - description: ObjectStoreStatus represents the status of a Ceph Object Store resource - properties: - bucketStatus: - description: BucketStatus represents the status of a bucket - properties: - details: - type: string - health: - description: ConditionType represent a resource's status - type: string - lastChanged: - type: string - lastChecked: - type: string - type: object - conditions: - items: - description: Condition represents a status condition on any Rook-Ceph Custom Resource. - properties: - lastHeartbeatTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - description: ConditionReason is a reason for a condition - type: string - status: - type: string - type: - description: ConditionType represent a resource's status - type: string - type: object - type: array - info: - additionalProperties: - type: string - nullable: true - type: object - message: - type: string - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - description: ConditionType represent a resource's status - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephobjectstoreusers.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectStoreUser - listKind: CephObjectStoreUserList - plural: cephobjectstoreusers - shortNames: - - rcou - - objectuser - singular: cephobjectstoreuser - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephObjectStoreUser represents a Ceph Object Store Gateway User - 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: ObjectStoreUserSpec represent the spec of an Objectstoreuser - properties: - capabilities: - description: Additional admin-level capabilities for the Ceph object store user - nullable: true - properties: - bucket: - description: Admin capabilities to read/write Ceph object store buckets. Documented in https://docs.ceph.com/en/latest/radosgw/admin/?#add-remove-admin-capabilities - enum: - - '*' - - read - - write - - read, write - type: string - metadata: - description: Admin capabilities to read/write Ceph object store metadata. Documented in https://docs.ceph.com/en/latest/radosgw/admin/?#add-remove-admin-capabilities - enum: - - '*' - - read - - write - - read, write - type: string - usage: - description: Admin capabilities to read/write Ceph object store usage. Documented in https://docs.ceph.com/en/latest/radosgw/admin/?#add-remove-admin-capabilities - enum: - - '*' - - read - - write - - read, write - type: string - user: - description: Admin capabilities to read/write Ceph object store users. Documented in https://docs.ceph.com/en/latest/radosgw/admin/?#add-remove-admin-capabilities - enum: - - '*' - - read - - write - - read, write - type: string - zone: - description: Admin capabilities to read/write Ceph object store zones. Documented in https://docs.ceph.com/en/latest/radosgw/admin/?#add-remove-admin-capabilities - enum: - - '*' - - read - - write - - read, write - type: string - type: object - displayName: - description: The display name for the ceph users - type: string - quotas: - description: ObjectUserQuotaSpec can be used to set quotas for the object store user to limit their usage. See the [Ceph docs](https://docs.ceph.com/en/latest/radosgw/admin/?#quota-management) for more - nullable: true - properties: - maxBuckets: - description: Maximum bucket limit for the ceph user - nullable: true - type: integer - maxObjects: - description: Maximum number of objects across all the user's buckets - format: int64 - nullable: true - type: integer - maxSize: - anyOf: - - type: integer - - type: string - description: Maximum size limit of all objects across all the user's buckets See https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity for more info. - nullable: true - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - store: - description: The store the user will be created in - type: string - type: object - status: - description: ObjectStoreUserStatus represents the status Ceph Object Store Gateway User - properties: - info: - additionalProperties: - type: string - nullable: true - type: object - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephobjectzonegroups.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZoneGroup - listKind: CephObjectZoneGroupList - plural: cephobjectzonegroups - singular: cephobjectzonegroup - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephObjectZoneGroup represents a Ceph Object Store Gateway Zone Group - 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: ObjectZoneGroupSpec represent the spec of an ObjectZoneGroup - properties: - realm: - description: The display name for the ceph users - type: string - required: - - realm - type: object - status: - description: Status represents the status of an object - properties: - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephobjectzones.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephObjectZone - listKind: CephObjectZoneList - plural: cephobjectzones - singular: cephobjectzone - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephObjectZone represents a Ceph Object Store Gateway Zone - 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: ObjectZoneSpec represent the spec of an ObjectZone - properties: - dataPool: - description: The data pool settings - nullable: true - properties: - compressionMode: - description: 'DEPRECATED: use Parameters instead, e.g., Parameters["compression_mode"] = "force" The inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force) Do NOT set a default value for kubebuilder as this will override the Parameters' - enum: - - none - - passive - - aggressive - - force - - "" - nullable: true - type: string - crushRoot: - description: The root of the crush hierarchy utilized by the pool - nullable: true - type: string - deviceClass: - description: The device class the OSD should set to for use in the pool - nullable: true - type: string - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool - type: boolean - erasureCoded: - description: The erasure code settings - properties: - algorithm: - description: The algorithm for erasure coding - type: string - codingChunks: - description: Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type). This is the number of OSDs that can be lost simultaneously before data cannot be recovered. - minimum: 0 - type: integer - dataChunks: - description: Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type). The number of chunks required to recover an object when any single OSD is lost is the same as dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery. - minimum: 0 - type: integer - required: - - codingChunks - - dataChunks - type: object - failureDomain: - description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map' - type: string - mirroring: - description: The mirroring settings - properties: - enabled: - description: Enabled whether this pool is mirrored or not - type: boolean - mode: - description: 'Mode is the mirroring mode: either pool or image' - type: string - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - snapshotSchedules: - description: SnapshotSchedules is the scheduling of snapshot for mirrored images/pools - items: - description: SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool - properties: - interval: - description: Interval represent the periodicity of the snapshot. - type: string - path: - description: Path is the path to snapshot, only valid for CephFS - type: string - startTime: - description: StartTime indicates when to start the snapshot - type: string - type: object - type: array - type: object - parameters: - additionalProperties: - type: string - description: Parameters is a list of properties to enable on a given pool - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - quotas: - description: The quota settings - nullable: true - properties: - maxBytes: - description: MaxBytes represents the quota in bytes Deprecated in favor of MaxSize - format: int64 - type: integer - maxObjects: - description: MaxObjects represents the quota in objects - format: int64 - type: integer - maxSize: - description: MaxSize represents the quota in bytes as a string - pattern: ^[0-9]+[\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$ - type: string - type: object - replicated: - description: The replication settings - properties: - hybridStorage: - description: HybridStorage represents hybrid storage tier settings - nullable: true - properties: - primaryDeviceClass: - description: PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD - minLength: 1 - type: string - secondaryDeviceClass: - description: SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs - minLength: 1 - type: string - required: - - primaryDeviceClass - - secondaryDeviceClass - type: object - replicasPerFailureDomain: - description: ReplicasPerFailureDomain the number of replica in the specified failure domain - minimum: 1 - type: integer - requireSafeReplicaSize: - description: RequireSafeReplicaSize if false allows you to set replica 1 - type: boolean - size: - description: Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type) - minimum: 0 - type: integer - subFailureDomain: - description: SubFailureDomain the name of the sub-failure domain - type: string - targetSizeRatio: - description: TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity - type: number - required: - - size - type: object - statusCheck: - description: The mirroring statusCheck - properties: - mirror: - description: HealthCheckSpec represents the health check of an object store bucket - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - metadataPool: - description: The metadata pool settings - nullable: true - properties: - compressionMode: - description: 'DEPRECATED: use Parameters instead, e.g., Parameters["compression_mode"] = "force" The inline compression mode in Bluestore OSD to set to (options are: none, passive, aggressive, force) Do NOT set a default value for kubebuilder as this will override the Parameters' - enum: - - none - - passive - - aggressive - - force - - "" - nullable: true - type: string - crushRoot: - description: The root of the crush hierarchy utilized by the pool - nullable: true - type: string - deviceClass: - description: The device class the OSD should set to for use in the pool - nullable: true - type: string - enableRBDStats: - description: EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool - type: boolean - erasureCoded: - description: The erasure code settings - properties: - algorithm: - description: The algorithm for erasure coding - type: string - codingChunks: - description: Number of coding chunks per object in an erasure coded storage pool (required for erasure-coded pool type). This is the number of OSDs that can be lost simultaneously before data cannot be recovered. - minimum: 0 - type: integer - dataChunks: - description: Number of data chunks per object in an erasure coded storage pool (required for erasure-coded pool type). The number of chunks required to recover an object when any single OSD is lost is the same as dataChunks so be aware that the larger the number of data chunks, the higher the cost of recovery. - minimum: 0 - type: integer - required: - - codingChunks - - dataChunks - type: object - failureDomain: - description: 'The failure domain: osd/host/(region or zone if available) - technically also any type in the crush map' - type: string - mirroring: - description: The mirroring settings - properties: - enabled: - description: Enabled whether this pool is mirrored or not - type: boolean - mode: - description: 'Mode is the mirroring mode: either pool or image' - type: string - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - snapshotSchedules: - description: SnapshotSchedules is the scheduling of snapshot for mirrored images/pools - items: - description: SnapshotScheduleSpec represents the snapshot scheduling settings of a mirrored pool - properties: - interval: - description: Interval represent the periodicity of the snapshot. - type: string - path: - description: Path is the path to snapshot, only valid for CephFS - type: string - startTime: - description: StartTime indicates when to start the snapshot - type: string - type: object - type: array - type: object - parameters: - additionalProperties: - type: string - description: Parameters is a list of properties to enable on a given pool - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - quotas: - description: The quota settings - nullable: true - properties: - maxBytes: - description: MaxBytes represents the quota in bytes Deprecated in favor of MaxSize - format: int64 - type: integer - maxObjects: - description: MaxObjects represents the quota in objects - format: int64 - type: integer - maxSize: - description: MaxSize represents the quota in bytes as a string - pattern: ^[0-9]+[\.]?[0-9]*([KMGTPE]i|[kMGTPE])?$ - type: string - type: object - replicated: - description: The replication settings - properties: - hybridStorage: - description: HybridStorage represents hybrid storage tier settings - nullable: true - properties: - primaryDeviceClass: - description: PrimaryDeviceClass represents high performance tier (for example SSD or NVME) for Primary OSD - minLength: 1 - type: string - secondaryDeviceClass: - description: SecondaryDeviceClass represents low performance tier (for example HDDs) for remaining OSDs - minLength: 1 - type: string - required: - - primaryDeviceClass - - secondaryDeviceClass - type: object - replicasPerFailureDomain: - description: ReplicasPerFailureDomain the number of replica in the specified failure domain - minimum: 1 - type: integer - requireSafeReplicaSize: - description: RequireSafeReplicaSize if false allows you to set replica 1 - type: boolean - size: - description: Size - Number of copies per object in a replicated storage pool, including the object itself (required for replicated pool type) - minimum: 0 - type: integer - subFailureDomain: - description: SubFailureDomain the name of the sub-failure domain - type: string - targetSizeRatio: - description: TargetSizeRatio gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity - type: number - required: - - size - type: object - statusCheck: - description: The mirroring statusCheck - properties: - mirror: - description: HealthCheckSpec represents the health check of an object store bucket - nullable: true - properties: - disabled: - type: boolean - interval: - description: Interval is the internal in second or minute for the health check to run like 60s for 60 seconds - type: string - timeout: - type: string - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - zoneGroup: - description: The display name for the ceph users - type: string - required: - - dataPool - - metadataPool - - zoneGroup - type: object - status: - description: Status represents the status of an object - properties: - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c - creationTimestamp: null - name: cephrbdmirrors.ceph.rook.io -spec: - group: ceph.rook.io - names: - kind: CephRBDMirror - listKind: CephRBDMirrorList - plural: cephrbdmirrors - singular: cephrbdmirror - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Phase - type: string - name: v1 - schema: - openAPIV3Schema: - description: CephRBDMirror represents a Ceph RBD Mirror - 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: RBDMirroringSpec represents the specification of an RBD mirror daemon - properties: - annotations: - additionalProperties: - type: string - description: The annotations-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - count: - description: Count represents the number of rbd mirror instance to run - minimum: 1 - type: integer - labels: - additionalProperties: - type: string - description: The labels-related configuration to add/set on each Pod related object. - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - peers: - description: Peers represents the peers spec - nullable: true - properties: - secretNames: - description: SecretNames represents the Kubernetes Secret names to add rbd-mirror or cephfs-mirror peers - items: - type: string - type: array - type: object - placement: - description: The affinity to place the rgw pods (default is to place on any available node) - nullable: true - properties: - nodeAffinity: - description: NodeAffinity is a group of node affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements by node's fields. - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: PodAffinity is a group of inter pod affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: PodAntiAffinity is a group of inter pod anti affinity scheduling rules - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - tolerations: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - maxSkew: - description: 'MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It''s a required field. Default value is 1 and 0 is not allowed.' - format: int32 - type: integer - topologyKey: - description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - priorityClassName: - description: PriorityClassName sets priority class on the rbd mirror pods - type: string - resources: - description: The resource requirements for the rbd mirror pods - nullable: true - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - count - type: object - status: - description: Status represents the status of an object - properties: - observedGeneration: - description: ObservedGeneration is the latest generation observed by the controller. - format: int64 - type: integer - phase: - type: string - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - metadata - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -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: 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: {} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/role.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/role.yaml deleted file mode 100644 index 926d367..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/role.yaml +++ /dev/null @@ -1,133 +0,0 @@ -{{- if .Values.operator.rbacEnable }} -# The role for the operator to manage resources in its own namespace -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: rook-ceph-system - labels: - operator: rook - storage-backend: ceph -rules: -- apiGroups: - - "" - resources: - - pods - - configmaps - - services - - serviceaccounts - verbs: - - get - - list - - watch - - patch - - create - - update - - delete - - patch -- apiGroups: - - apps - resources: - - daemonsets - - statefulsets - - deployment - verbs: - - get - - list - - watch - - create - - update - - delete ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-osd -rules: -- apiGroups: [""] - resources: ["configmaps"] - verbs: [ "get", "list", "watch", "create", "update", "delete" ] -- apiGroups: ["ceph.rook.io"] - resources: ["cephclusters", "cephclusters/finalizers"] - verbs: [ "get", "list", "create", "update", "delete" ] ---- -# Aspects of ceph-mgr that operate within the cluster's namespace -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-mgr -rules: -- apiGroups: - - "" - resources: - - pods - - services - verbs: - - get - - list - - watch -- apiGroups: - - batch - resources: - - jobs - verbs: - - get - - list - - watch - - create - - update - - delete -- apiGroups: - - ceph.rook.io - resources: - - "*" - verbs: - - "*" ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-cmd-reporter -rules: -- apiGroups: - - "" - resources: - - pods - - configmaps - verbs: - - get - - list - - watch - - create - - update - - delete ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-external-provisioner-cfg -rules: - - apiGroups: [""] - resources: ["endpoints"] - verbs: ["get", "watch", "list", "delete", "update", "create"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list", "create", "delete"] - - apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - verbs: ["get", "watch", "list", "delete", "update", "create"] ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-external-provisioner-cfg -rules: - - apiGroups: [""] - resources: ["endpoints"] - verbs: ["get", "watch", "list", "delete", "update", "create"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list", "watch", "create", "delete"] - - apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - verbs: ["get", "watch", "list", "delete", "update", "create"] -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/rolebinding.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/rolebinding.yaml deleted file mode 100644 index d5e0fea..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/rolebinding.yaml +++ /dev/null @@ -1,121 +0,0 @@ -{{- if .Values.operator.rbacEnable }} -# Grant the operator, agent, and discovery agents access to resources in the rook-ceph-system namespace -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-system - namespace: {{ .Release.Namespace }} - labels: - operator: rook - storage-backend: ceph -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: rook-ceph-system -subjects: -- kind: ServiceAccount - name: rook-ceph-system - namespace: {{ .Release.Namespace }} ---- - # Allow the operator to create resources in this cluster's namespace -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-cluster-mgmt - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-cluster-mgmt -subjects: -- kind: ServiceAccount - name: rook-ceph-system - namespace: {{ .Release.Namespace }} ---- -# Allow the osd pods in this namespace to work with configmaps -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-osd - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: rook-ceph-osd -subjects: -- kind: ServiceAccount - name: rook-ceph-osd - namespace: {{ .Release.Namespace }} ---- -# Allow the ceph mgr to access the cluster-specific resources necessary for the mgr modules -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-mgr - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: rook-ceph-mgr -subjects: -- kind: ServiceAccount - name: rook-ceph-mgr - namespace: {{ .Release.Namespace }} ---- -# Allow the ceph mgr to access the rook system resources necessary for the mgr modules -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-mgr-system - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-mgr-system -subjects: -- kind: ServiceAccount - name: rook-ceph-mgr - namespace: {{ .Release.Namespace }} ---- -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-cmd-reporter - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: rook-ceph-cmd-reporter -subjects: -- kind: ServiceAccount - name: rook-ceph-cmd-reporter - namespace: {{ .Release.Namespace }} ---- -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: cephfs-csi-provisioner-role-cfg - namespace: {{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: rook-csi-cephfs-provisioner-sa - namespace: {{ .Release.Namespace }} -roleRef: - kind: Role - name: cephfs-external-provisioner-cfg - apiGroup: rbac.authorization.k8s.io ---- -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rbd-csi-provisioner-role-cfg - namespace: {{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: rook-csi-rbd-provisioner-sa - namespace: {{ .Release.Namespace }} -roleRef: - kind: Role - name: rbd-external-provisioner-cfg - apiGroup: rbac.authorization.k8s.io -{{- end }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/rook-config-override.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/rook-config-override.yaml deleted file mode 100644 index d63c6d5..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/rook-config-override.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: rook-config-override - namespace: {{ .Release.Namespace }} -data: - config: | - [global] - osd_journal_size = 1024 - osd_pool_default_size = 1 - osd_pool_default_min_size = 1 - osd_pool_default_pg_num = 64 - osd_pool_default_pgp_num = 64 - osd_crush_chooseleaf_type = 1 - setuser match path = /var/lib/ceph/$type/$cluster-$id - mon_osd_min_down_reporters = 1 - osd_mon_report_interval_max = 120 - mon_max_pg_per_osd = 2048 - osd_max_pg_per_osd_hard_ratio = 1.2 - ms_bind_ipv6 = false - - [osd] - osd_mkfs_type = xfs - osd_mkfs_options_xfs = "-f" - osd_mount_options_xfs = "rw,noatime,inode64,logbufs=8,logbsize=256k" - - [mon] - mon warn on legacy crush tunables = false - mon pg warn max per osd = 2048 - mon pg warn max object skew = 0 - mon clock drift allowed = .1 - mon warn on pool no redundancy = false diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/serviceaccount.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/serviceaccount.yaml deleted file mode 100644 index 720e2cf..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/templates/serviceaccount.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# Service acccount for the operator -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-ceph-system - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -{{ template "imagePullSecrets" . }} ---- -# Service account for the Ceph OSDs. Must exist and cannot be renamed. -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-ceph-osd - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -{{ template "imagePullSecrets" . }} ---- -# Service account for the Ceph Mgr. Must exist and cannot be renamed. -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-ceph-mgr - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -{{ template "imagePullSecrets" . }} ---- -# Service account for job that purges OSDs from a Rook-Ceph cluster -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-ceph-purge-osd -{{ template "imagePullSecrets" . }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-ceph-cmd-reporter - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -{{ template "imagePullSecrets" . }} ---- -# Service account for the cephfs csi driver -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-csi-cephfs-plugin-sa -{{ template "imagePullSecrets" . }} ---- -# Service account for the cephfs csi provisioner -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-csi-cephfs-provisioner-sa -{{ template "imagePullSecrets" . }} ---- -# Service account for the rbd csi driver -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-csi-rbd-plugin-sa -{{ template "imagePullSecrets" . }} ---- -# Service account for the rbd csi provisioner -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rook-csi-rbd-provisioner-sa -{{ template "imagePullSecrets" . }} diff --git a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/values.yaml b/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/values.yaml deleted file mode 100644 index 71fa291..0000000 --- a/stx-rook-ceph/stx-rook-ceph/helm-charts/rook-operator/values.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -operator: - image: - prefix: rook - repository: rook/ceph - tag: v1.9.6 - pullPolicy: IfNotPresent - resources: - limits: - cpu: 500m - memory: 256Mi - requests: - cpu: 100m - memory: 256Mi - # Tolerations for the rook-ceph-operator to allow it to run on nodes with particular taints - tolerations: [] - # Delay to use in node.kubernetes.io/unreachable toleration - unreachableNodeTolerationSeconds: 5 - # Whether rook watches its current namespace for CRDs or the entire cluster, defaults to false - currentNamespaceOnly: false - # Interval at which to get the ceph status and update the cluster custom resource status - cephStatusCheckInterval: "60s" - mon: - healthCheckInterval: "45s" - monOutTimeout: "600s" - ## Annotations to be added to pod - annotations: {} - ## LogLevel can be set to: TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR or CRITICAL - logLevel: INFO - ## If true, create & use RBAC resources - rbacEnable: true - ## If true, create & use PSP resources - pspEnable: false - ## Settings for whether to disable the drivers or other daemons if they are not needed - csi: - enableRbdDriver: true - enableCephfsDriver: true - enableGrpcMetrics: true - enableSnapshotter: true - - # Enable Ceph Kernel clients on kernel < 4.17. If your kernel does not support quotas for CephFS - # you may want to disable this setting. However, this will cause an issue during upgrades - # with the FUSE client. See the upgrade guide: https://rook.io/docs/rook/v1.2/ceph-upgrade.html - forceCephFSKernelClient: true - - kubeletDirPath: /var/lib/kubelet - cephcsi: - image: quay.io/cephcsi/cephcsi:v3.6.2 - registrar: - image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.4.0 - provisioner: - image: gcr.io/k8s-staging-sig-storage/csi-provisioner:v3.1.0 - snapshotter: - image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.0 - attacher: - image: k8s.gcr.io/sig-storage/csi-attacher:v3.4.0 - resizer: - image: k8s.gcr.io/sig-storage/csi-resizer:v1.4.0 - enableFlexDriver: false - enableDiscoveryDaemon: true - - # In some situations SELinux relabelling breaks (times out) on large filesystems, and doesn't work with cephfs ReadWriteMany volumes (last relabel wins). - # Disable it here if you have similar issues. - # For more details see https://github.com/rook/rook/issues/2417 - enableSelinuxRelabeling: true - # Writing to the hostPath is required for the Ceph mon and osd pods. Given the restricted permissions in OpenShift with SELinux, - # the pod must be running privileged in order to write to the hostPath volume, this must be set to true then. - hostpathRequiresPrivileged: false - # Disable automatic orchestration when new devices are discovered. - disableDeviceHotplug: false - # Blacklist certain disks according to the regex provided. - discoverDaemonUdev: - -# imagePullSecrets option allow to pull docker images from private docker registry. Option will be passed to all service accounts. -imagePullSecrets: -- name: default-registry-key - -saInit: - name: sa-init - images: - tags: - sa_init_provisioner: docker.io/openstackhelm/ceph-config-helper:ubuntu_bionic-20220802 - -cleanup: - enable: true - cluster_cleanup: ceph-cluster