From 81c1f7370c268eda86f95dc837b719b919f4d890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Tue, 14 Feb 2023 21:31:25 +0100 Subject: [PATCH 1/7] Changes to become compatible with crate2nix --- rust/operator-binary/build.rs | 14 ++++++++++++-- rust/operator-binary/src/main.rs | 11 ++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/rust/operator-binary/build.rs b/rust/operator-binary/build.rs index d8f91cb9..d6e8ee61 100644 --- a/rust/operator-binary/build.rs +++ b/rust/operator-binary/build.rs @@ -1,3 +1,13 @@ +use std::path::PathBuf; + fn main() { - built::write_built_file().expect("Failed to acquire build-time information"); -} + let out_dir = PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR is required")); + built::write_built_file_with_opts( + // built's env module depends on a whole bunch of variables that crate2nix doesn't provide + // so we grab the specific env variables that we care about out ourselves instead. + built::Options::default().set_env(false), + "Cargo.toml".as_ref(), + &out_dir.join("built.rs"), + ) + .unwrap(); +} \ No newline at end of file diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index 776bad24..271409e6 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -8,7 +8,7 @@ mod znode_controller; use crate::zk_controller::ZK_CONTROLLER_NAME; use crate::znode_controller::ZNODE_CONTROLLER_NAME; -use clap::Parser; +use clap::{crate_description, crate_version, Parser}; use futures::StreamExt; use stackable_operator::{ cli::{Command, ProductOperatorRun}, @@ -28,13 +28,14 @@ use std::sync::Arc; mod built_info { include!(concat!(env!("OUT_DIR"), "/built.rs")); + pub const TARGET_PLATFORM: Option<&str> = option_env!("TARGET"); } const APP_NAME: &str = "zookeeper"; const OPERATOR_NAME: &str = "zookeeper.stackable.tech"; #[derive(clap::Parser)] -#[clap(about = built_info::PKG_DESCRIPTION, author = stackable_operator::cli::AUTHOR)] +#[clap(about, author)] struct Opts { #[clap(subcommand)] cmd: Command, @@ -59,10 +60,10 @@ async fn main() -> anyhow::Result<()> { tracing_target, ); stackable_operator::utils::print_startup_string( - built_info::PKG_DESCRIPTION, - built_info::PKG_VERSION, + crate_description!(), + crate_version!(), built_info::GIT_VERSION, - built_info::TARGET, + built_info::TARGET_PLATFORM.unwrap_or("unknown target"), built_info::BUILT_TIME_UTC, built_info::RUSTC_VERSION, ); From cbc6d3d0ec10f1dcb4cf1904975ed2819a04ee4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Tue, 14 Feb 2023 22:25:22 +0100 Subject: [PATCH 2/7] rustfmt --- rust/operator-binary/build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/operator-binary/build.rs b/rust/operator-binary/build.rs index d6e8ee61..ed36fcf0 100644 --- a/rust/operator-binary/build.rs +++ b/rust/operator-binary/build.rs @@ -9,5 +9,5 @@ fn main() { "Cargo.toml".as_ref(), &out_dir.join("built.rs"), ) - .unwrap(); -} \ No newline at end of file + .unwrap(); +} From 03d83bf10772b5b92c852c7788f989e93bff586c Mon Sep 17 00:00:00 2001 From: Stacky McStackface Date: Thu, 16 Feb 2023 21:14:20 +0000 Subject: [PATCH 3/7] Update templated files to rev 67a7b65 (#642) Automatically created PR based on commit 67a7b65bd5dc36ecb8d4e85fe6a649e251a0f602 in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: lfrancke with message [...] --- .github/workflows/build.yml | 70 +++++++++---------------------------- 1 file changed, 17 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bdf23f22..d2afd84f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,21 +38,12 @@ jobs: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: submodules: recursive - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7 - with: - profile: minimal - toolchain: "1.65.0" - override: true + - uses: dtolnay/rust-toolchain@1.65.0 - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 with: key: udeps - - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3 - with: - command: install - args: cargo-udeps --locked - - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3 - with: - command: udeps + - run: cargo install cargo-udeps + - run: cargo udeps # This job evaluates the github environment to determine why this action is running and selects the appropriate # target repository for published Helm charts based on this. @@ -86,16 +77,16 @@ jobs: run: | if [[ $TRIGGER == "pull_request" ]]; then echo "exporting test as target helm repo: ${{ env.TEST_REPO_HELM_URL }}" - echo "::set-output name=helm_repo::${{ env.TEST_REPO_HELM_URL }}" + echo "helm_repo=${{ env.TEST_REPO_HELM_URL }}" >> $GITHUB_OUTPUT elif [[ $TRIGGER == "push" && $GITHUB_REF == "refs/heads/main" ]]; then echo "exporting dev as target helm repo: ${{ env.DEV_REPO_HELM_URL }}" - echo "::set-output name=helm_repo::${{ env.DEV_REPO_HELM_URL }}" + echo "helm_repo=${{ env.DEV_REPO_HELM_URL }}" >> $GITHUB_OUTPUT elif [[ ( $TRIGGER == "create" || $TRIGGER == "push" ) && $GITHUB_REF == refs/tags/* ]]; then echo "exporting stable as target helm repo: ${{ env.STABLE_REPO_HELM_URL }}" - echo "::set-output name=helm_repo::${{ env.STABLE_REPO_HELM_URL }}" + echo "helm_repo=${{ env.STABLE_REPO_HELM_URL }}" >> $GITHUB_OUTPUT else echo "Unknown trigger and ref combination encountered, skipping publish step: $TRIGGER $GITHUB_REF" - echo "::set-output name=helm_repo::skip" + echo "helm_repo=skip" >> $GITHUB_OUTPUT fi run_cargodeny: @@ -125,16 +116,10 @@ jobs: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: submodules: recursive - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7 + - uses: dtolnay/rust-toolchain@1.65.0 with: - profile: minimal - toolchain: "1.65.0" components: rustfmt - override: true - - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all -- --check run_clippy: name: Run Clippy @@ -147,12 +132,9 @@ jobs: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: submodules: recursive - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7 + - uses: dtolnay/rust-toolchain@1.65.0 with: - profile: minimal - toolchain: "1.65.0" components: clippy - override: true - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 with: key: clippy @@ -181,19 +163,13 @@ jobs: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: submodules: recursive - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7 + - uses: dtolnay/rust-toolchain@1.65.0 with: - profile: minimal - toolchain: "1.65.0" components: rustfmt - override: true - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 with: key: doc - - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3 - with: - command: doc - args: --document-private-items + - run: cargo doc --document-private-items run_tests: name: Run Cargo Tests @@ -206,17 +182,12 @@ jobs: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: submodules: recursive - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7 - with: - profile: minimal - toolchain: "1.65.0" - override: true + - uses: dtolnay/rust-toolchain@1.65.0 - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 with: key: test - - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3 - with: - command: test + - run: cargo test + # Similar to check_charts, this tries to render the README, and see if there are unintended changes. # This will save us from merging changes to the wrong file (instead of the templated source), and from @@ -272,11 +243,7 @@ jobs: with: version: v3.6.2 - name: Set up cargo - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7 - with: - profile: minimal - toolchain: "1.65.0" - override: true + uses: dtolnay/rust-toolchain@1.65.0 - name: Set up rust-cache uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 with: @@ -329,12 +296,9 @@ jobs: submodules: recursive - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4 if: ${{ github.event_name == 'pull_request' }} - - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7 + - uses: dtolnay/rust-toolchain@1.65.0 with: - profile: minimal - toolchain: "1.65.0" components: rustfmt - override: true - name: Install requirements for version tool if: ${{ github.event_name == 'pull_request' }} run: pip install -r python/requirements.txt From d6afd6cdec0052a01305e499e0fc90c3ec65a915 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Fri, 17 Feb 2023 08:11:16 +0000 Subject: [PATCH 4/7] set version to 0.0.0-dev (#643) --- Cargo.lock | 4 ++-- deploy/helm/zookeeper-operator/Chart.yaml | 4 ++-- rust/crd/Cargo.toml | 2 +- rust/operator-binary/Cargo.toml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 859bdf18..8a2e5f09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1897,7 +1897,7 @@ dependencies = [ [[package]] name = "stackable-zookeeper-crd" -version = "0.13.0-nightly" +version = "0.0.0-dev" dependencies = [ "serde", "serde_json", @@ -1909,7 +1909,7 @@ dependencies = [ [[package]] name = "stackable-zookeeper-operator" -version = "0.13.0-nightly" +version = "0.0.0-dev" dependencies = [ "anyhow", "built", diff --git a/deploy/helm/zookeeper-operator/Chart.yaml b/deploy/helm/zookeeper-operator/Chart.yaml index 5ea9f6fb..884bd34c 100644 --- a/deploy/helm/zookeeper-operator/Chart.yaml +++ b/deploy/helm/zookeeper-operator/Chart.yaml @@ -1,8 +1,8 @@ --- apiVersion: v2 name: zookeeper-operator -version: "0.13.0-nightly" -appVersion: "0.13.0-nightly" +version: "0.0.0-dev" +appVersion: "0.0.0-dev" description: The Stackable Operator for Apache ZooKeeper home: https://github.com/stackabletech/zookeeper-operator maintainers: diff --git a/rust/crd/Cargo.toml b/rust/crd/Cargo.toml index 8b962b99..a1fd39a0 100644 --- a/rust/crd/Cargo.toml +++ b/rust/crd/Cargo.toml @@ -3,7 +3,7 @@ name = "stackable-zookeeper-crd" authors = ["Stackable GmbH "] description = "Contains the Apache ZooKeeper CRD structs and utilities" license = "OSL-3.0" -version = "0.13.0-nightly" +version = "0.0.0-dev" edition = "2021" repository = "https://github.com/stackabletech/zookeeper-operator" publish = false diff --git a/rust/operator-binary/Cargo.toml b/rust/operator-binary/Cargo.toml index 10a1f59f..0b714ecd 100644 --- a/rust/operator-binary/Cargo.toml +++ b/rust/operator-binary/Cargo.toml @@ -3,7 +3,7 @@ name = "stackable-zookeeper-operator" authors = ["Stackable GmbH "] description = "Stackable Operator for Apache ZooKeeper" license = "OSL-3.0" -version = "0.13.0-nightly" +version = "0.0.0-dev" edition = "2021" repository = "https://github.com/stackabletech/zookeeper-operator" publish = false From 08f4e0af628fe509908c107b413ab070b16222d0 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Mon, 20 Feb 2023 08:03:00 +0000 Subject: [PATCH 5/7] Generate olm bundles for openshift (#645) # Description This PR is used to intentionally bundle a specific version of the zookeeper-operator (23.1.0) in order to test olm deployment with zookeeper/commons operators. The manifests are operator/version specific but the `makefile` change can be incorporated into operator-templating later on. --- CHANGELOG.md | 8 + deploy/experimental/olm/README.md | 120 --- deploy/experimental/olm/catalog-source.yaml | 21 - deploy/experimental/olm/catalog.Dockerfile | 14 - .../olm/manifests/zookeepercluster.crd.yaml | 350 -------- .../olm/manifests/zookeeperznode.crd.yaml | 49 - deploy/experimental/olm/operator-group.yaml | 6 - deploy/experimental/olm/subscription.yaml | 12 - .../olm => olm/23.1.0}/.gitignore | 2 +- .../23.1.0}/manifests/configmap.yaml | 2 +- .../olm => olm/23.1.0}/manifests/csv.yaml | 16 +- .../olm => olm/23.1.0}/manifests/roles.yaml | 2 +- deploy/olm/23.1.0/manifests/zkcluster.yaml | 839 ++++++++++++++++++ deploy/olm/23.1.0/manifests/zknode.yaml | 62 ++ deploy/olm/bundle.sh | 32 + 15 files changed, 956 insertions(+), 579 deletions(-) delete mode 100644 deploy/experimental/olm/README.md delete mode 100644 deploy/experimental/olm/catalog-source.yaml delete mode 100644 deploy/experimental/olm/catalog.Dockerfile delete mode 100644 deploy/experimental/olm/manifests/zookeepercluster.crd.yaml delete mode 100644 deploy/experimental/olm/manifests/zookeeperznode.crd.yaml delete mode 100644 deploy/experimental/olm/operator-group.yaml delete mode 100644 deploy/experimental/olm/subscription.yaml rename deploy/{experimental/olm => olm/23.1.0}/.gitignore (63%) rename deploy/{experimental/olm => olm/23.1.0}/manifests/configmap.yaml (99%) rename deploy/{experimental/olm => olm/23.1.0}/manifests/csv.yaml (95%) rename deploy/{experimental/olm => olm/23.1.0}/manifests/roles.yaml (93%) create mode 100644 deploy/olm/23.1.0/manifests/zkcluster.yaml create mode 100644 deploy/olm/23.1.0/manifests/zknode.yaml create mode 100755 deploy/olm/bundle.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index a14a2be7..70fad3d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file. ### Added +- Generate OLM bundle ([#645]) + +[#645]: https://github.com/stackabletech/commons-operator/pull/645 + +## [23.1.0] - 2023-01-23 + +### Added + - Log aggregation added ([#588]). [#588]: https://github.com/stackabletech/zookeeper-operator/pull/588 diff --git a/deploy/experimental/olm/README.md b/deploy/experimental/olm/README.md deleted file mode 100644 index edae7cde..00000000 --- a/deploy/experimental/olm/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# OLM installation files - -The following steps describe how to install the Stackable operator for Apache Zookeeper using the [Operator Lifecycle Manager](https://olm.operatorframework.io/) (OLM). - -It specifically installs the version 0.10.0 of the operator. Installing additional versions in the future requires generating new bundle images and updating the catalog as described below. - -## Usage - -Prerequisite is of course a running OpenShift cluster. - -First, install the operator using OLM: - - kubectl apply -f catalog-source.yaml \ - -f operator-group.yaml \ - -f subscription.yaml - -Then, install the operator dependencies with Helm: - - helm install secret-operator stackable/secret-operator - helm install commons-operator stackable/commons-operator - -And finally, create an Apache Zookeeper cluster: - - kubectl create -f examples/simple-zookeeper-cluster.yaml - -NOTE: The `kuttl` tests don't work because they themselves require SCCs which are not available. - -## OLM packaging requirements - -- An [OpenShift](https://developers.redhat.com/products/openshift-local/overview) cluster. -- [opm](https://github.com/operator-framework/operator-registry/) -- docker and kubectl -- `kubeadmin` access - -It was tested with: - - $ crc version - WARN A new version (2.5.1) has been published on https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/2.5.1/crc-linux-amd64.tar.xz - CRC version: 2.4.1+b877358 - OpenShift version: 4.10.14 - Podman version: 4.0.2 - - $ oc version - Client Version: 4.10.14 - Server Version: 4.10.14 - Kubernetes Version: v1.23.5+b463d71 - - $ opm version - Version: version.Version{OpmVersion:"v1.23.2", GitCommit:"82505333", BuildDate:"2022-07-04T13:45:39Z", GoOs:"linux", GoArch:"amd64"} - -## Open questions - -- OLM [doesn't support DaemonSet(s)](https://github.com/operator-framework/operator-lifecycle-manager/issues/1022) and we need them for the secret-operator. Currently we can deploy the secret-operator using Helm but this means we cannot configure the [required](https://olm.operatorframework.io/docs/tasks/creating-operator-manifests/#required-apis) apis of the Zookeeper bundle. What are the consequences for publishing and certification ? -- Here we create a catalog for a single operator. We probably want a catalog for all Stackable operators in the future but this will get large very quickly. Figure out how to handle this. Especially figure out what happens with new versions of the same operator. -- OLM cannot create SecurityContextConstraints objects. The Zookeeper cluster (not the operator) cannot run with the default `restricted` SCC. The current solution is to use the `hostmount-anyuid` SCC for the `zookeeper-clusterrole`. Will this pass the certification process ? -- Everything (catalog, subscription, etc) is installed in the `stackable-operators` namespace. Is this a good idea ? -- The Subscription object uses `installPlanApproval: Automatic` which means the operator is updated automatically for every new version. Is this a good idea? - -See the [OLM documentation](https://olm.operatorframework.io/docs/tasks/) for details. - -## Build and publish operator bundle image - -### Generate operator bundle - - opm alpha bundle generate --directory manifests --package zookeeper-operator --output-dir bundle --channels stable --default stable - -### Build bundle image - - docker build -t docker.stackable.tech/stackable/zookeeper-operator-bundle:latest -f bundle.Dockerfile . - docker push docker.stackable.tech/stackable/zookeeper-operator-bundle:latest - -### Validate bundle image - - opm alpha bundle validate --tag docker.stackable.tech/stackable/zookeeper-operator-bundle:latest --image-builder docker - -## Create catalog - - mkdir catalog - - opm generate dockerfile catalog - -NOTE: with the command below we can add the Stackable logo as icon. - - opm init zookeeper-operator \ - --default-channel=preview \ - --description=./README.md \ - --output yaml > catalog/operator.yaml - - cat << EOF >> catalog/operator.yaml - --- - schema: olm.channel - package: zookeeper-operator - name: preview - entries: - - name: zookeeper-operator.v0.10.0 - EOF - -NOTE: the command below generates yaml with broken indentation. I had to manually fix it. - - opm render docker.stackable.tech/stackable/zookeeper-operator-bundle:latest --output=yaml >> catalog/operator.yaml - - opm validate catalog - -The catalog is correct if the command above returns successfully without any message. If the catalog doesn't validate, the operator will not install. - - docker build . -f catalog.Dockerfile -t docker.stackable.tech/stackable/zookeeper-operator-catalog:latest - docker push docker.stackable.tech/stackable/zookeeper-operator-catalog:latest - -## Install catalog - - kubectl apply -f catalog-source.yaml - -## List available operators - - kubectl get packagemanifest -n stackable-operators - -## Install operator - - kubectl apply -f operator-group.yaml - kubectl apply -f subscription.yaml diff --git a/deploy/experimental/olm/catalog-source.yaml b/deploy/experimental/olm/catalog-source.yaml deleted file mode 100644 index 5d2fde48..00000000 --- a/deploy/experimental/olm/catalog-source.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -kind: Namespace -apiVersion: v1 -metadata: - name: stackable-operators - labels: - name: stackable-operators ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: CatalogSource -metadata: - name: zookeeper-operator-catalog - namespace: stackable-operators -spec: - sourceType: grpc - image: docker.stackable.tech/stackable/zookeeper-operator-catalog:latest - displayName: Stackable Catalog - publisher: Stackable GmbH - updateStrategy: - registryPoll: - interval: 10m diff --git a/deploy/experimental/olm/catalog.Dockerfile b/deploy/experimental/olm/catalog.Dockerfile deleted file mode 100644 index 550c7bc9..00000000 --- a/deploy/experimental/olm/catalog.Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# The base image is expected to contain -# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe -FROM quay.io/operator-framework/opm:latest - -# Configure the entrypoint and command -ENTRYPOINT ["/bin/opm"] -CMD ["serve", "/configs"] - -# Copy declarative config root into image at /configs -COPY catalog /configs - -# Set DC-specific label for the location of the DC root directory -# in the image -LABEL operators.operatorframework.io.index.configs.v1=/configs diff --git a/deploy/experimental/olm/manifests/zookeepercluster.crd.yaml b/deploy/experimental/olm/manifests/zookeepercluster.crd.yaml deleted file mode 100644 index 6c1a0453..00000000 --- a/deploy/experimental/olm/manifests/zookeepercluster.crd.yaml +++ /dev/null @@ -1,350 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: zookeeperclusters.zookeeper.stackable.tech -spec: - group: zookeeper.stackable.tech - names: - categories: [] - kind: ZookeeperCluster - plural: zookeeperclusters - shortNames: - - zk - singular: zookeepercluster - scope: Namespaced - versions: - - additionalPrinterColumns: [] - name: v1alpha1 - schema: - openAPIV3Schema: - description: "Auto-generated derived type for ZookeeperClusterSpec via `CustomResource`" - properties: - spec: - description: A cluster of ZooKeeper nodes - properties: - config: - nullable: true - properties: - clientAuthentication: - description: "Only affects client connections. This setting controls: - If clients need to authenticate themselves against the server via TLS - Which ca.crt to use when validating the provided client certs Defaults to `None`" - nullable: true - properties: - authenticationClass: - type: string - required: - - authenticationClass - type: object - quorumTlsSecretClass: - description: "Only affects quorum communication. Use mutual verification between Zookeeper Nodes (mandatory). This setting controls: - Which cert the servers should use to authenticate themselves against other servers - Which ca.crt to use when validating the other server" - type: string - tls: - description: "Only affects client connections. This setting controls: - If TLS encryption is used at all - Which cert the servers should use to authenticate themselves against the client Defaults to `TlsSecretClass` { secret_class: \"tls\".to_string() }." - nullable: true - properties: - secretClass: - type: string - required: - - secretClass - type: object - type: object - servers: - nullable: true - properties: - cliOverrides: - additionalProperties: - type: string - default: {} - type: object - config: - default: {} - properties: - initLimit: - format: uint32 - minimum: 0.0 - nullable: true - type: integer - myidOffset: - format: uint16 - minimum: 0.0 - nullable: true - type: integer - resources: - nullable: true - properties: - cpu: - default: - min: ~ - max: ~ - properties: - max: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - min: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - type: object - memory: - properties: - limit: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - runtimeLimits: - type: object - type: object - storage: - properties: - data: - default: - capacity: ~ - properties: - capacity: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - selectors: - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. - nullable: true - 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 - storageClass: - nullable: true - type: string - type: object - type: object - type: object - syncLimit: - format: uint32 - minimum: 0.0 - nullable: true - type: integer - tickTime: - format: uint32 - minimum: 0.0 - nullable: true - type: integer - type: object - configOverrides: - additionalProperties: - additionalProperties: - type: string - type: object - default: {} - type: object - envOverrides: - additionalProperties: - type: string - default: {} - type: object - roleGroups: - additionalProperties: - properties: - cliOverrides: - additionalProperties: - type: string - default: {} - type: object - config: - default: {} - properties: - initLimit: - format: uint32 - minimum: 0.0 - nullable: true - type: integer - myidOffset: - format: uint16 - minimum: 0.0 - nullable: true - type: integer - resources: - nullable: true - properties: - cpu: - default: - min: ~ - max: ~ - properties: - max: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - min: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - type: object - memory: - properties: - limit: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - runtimeLimits: - type: object - type: object - storage: - properties: - data: - default: - capacity: ~ - properties: - capacity: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - selectors: - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. - nullable: true - 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 - storageClass: - nullable: true - type: string - type: object - type: object - type: object - syncLimit: - format: uint32 - minimum: 0.0 - nullable: true - type: integer - tickTime: - format: uint32 - minimum: 0.0 - nullable: true - type: integer - type: object - configOverrides: - additionalProperties: - additionalProperties: - type: string - type: object - default: {} - type: object - envOverrides: - additionalProperties: - type: string - default: {} - type: object - replicas: - format: uint16 - minimum: 0.0 - nullable: true - type: integer - selector: - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. - nullable: true - 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 - type: object - type: object - required: - - roleGroups - type: object - stopped: - description: "Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would)" - nullable: true - type: boolean - version: - description: Desired ZooKeeper version - nullable: true - type: string - type: object - status: - nullable: true - properties: - discoveryHash: - description: An opaque value that changes every time a discovery detail does - nullable: true - type: string - type: object - required: - - spec - title: ZookeeperCluster - type: object - served: true - storage: true - subresources: - status: {} diff --git a/deploy/experimental/olm/manifests/zookeeperznode.crd.yaml b/deploy/experimental/olm/manifests/zookeeperznode.crd.yaml deleted file mode 100644 index 3b67faea..00000000 --- a/deploy/experimental/olm/manifests/zookeeperznode.crd.yaml +++ /dev/null @@ -1,49 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: zookeeperznodes.zookeeper.stackable.tech -spec: - group: zookeeper.stackable.tech - names: - categories: [] - kind: ZookeeperZnode - plural: zookeeperznodes - shortNames: - - zno - - znode - singular: zookeeperznode - scope: Namespaced - versions: - - additionalPrinterColumns: [] - name: v1alpha1 - schema: - openAPIV3Schema: - description: "Auto-generated derived type for ZookeeperZnodeSpec via `CustomResource`" - properties: - spec: - description: "A claim for a single ZooKeeper ZNode tree (filesystem node)\n\nA `ConfigMap` will automatically be created with the same name, containing the connection string in the field `ZOOKEEPER`. Each `ZookeeperZnode` gets an isolated ZNode chroot, which the `ZOOKEEPER` automatically contains. All data inside of this chroot will be deleted when the corresponding `ZookeeperZnode` is.\n\n`ZookeeperZnode` is *not* designed to manage the contents of this ZNode. Instead, it should be used to create a chroot for an installation of an application to work inside. Initializing the contents is the responsibility of the application." - properties: - clusterRef: - default: - name: ~ - namespace: ~ - description: "A reference to a product cluster (for example, a `ZookeeperCluster`)\n\n`namespace`'s defaulting only applies when retrieved via [`ClusterRef::namespace_relative_from`]" - properties: - name: - description: The name of the cluster - nullable: true - type: string - namespace: - description: "The namespace of the cluster\n\nThis field is optional, and will default to the namespace of the referring object." - nullable: true - type: string - type: object - type: object - required: - - spec - title: ZookeeperZnode - type: object - served: true - storage: true - subresources: {} diff --git a/deploy/experimental/olm/operator-group.yaml b/deploy/experimental/olm/operator-group.yaml deleted file mode 100644 index e443ba90..00000000 --- a/deploy/experimental/olm/operator-group.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: zookeeper-operator-group - namespace: stackable-operators diff --git a/deploy/experimental/olm/subscription.yaml b/deploy/experimental/olm/subscription.yaml deleted file mode 100644 index 0337a7c1..00000000 --- a/deploy/experimental/olm/subscription.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: stackable-subscription - namespace: stackable-operators # namespace-you-want-your-operator-installed-in -spec: - channel: preview - name: zookeeper-operator - source: zookeeper-operator-catalog - sourceNamespace: stackable-operators - installPlanApproval: Automatic # Manual diff --git a/deploy/experimental/olm/.gitignore b/deploy/olm/23.1.0/.gitignore similarity index 63% rename from deploy/experimental/olm/.gitignore rename to deploy/olm/23.1.0/.gitignore index ad84c8dc..741604f1 100644 --- a/deploy/experimental/olm/.gitignore +++ b/deploy/olm/23.1.0/.gitignore @@ -1,4 +1,4 @@ bundle bundle.Dockerfile - +catalog.Dockerfile catalog diff --git a/deploy/experimental/olm/manifests/configmap.yaml b/deploy/olm/23.1.0/manifests/configmap.yaml similarity index 99% rename from deploy/experimental/olm/manifests/configmap.yaml rename to deploy/olm/23.1.0/manifests/configmap.yaml index 53c490cc..ea59e8e7 100644 --- a/deploy/experimental/olm/manifests/configmap.yaml +++ b/deploy/olm/23.1.0/manifests/configmap.yaml @@ -409,4 +409,4 @@ metadata: labels: app.kubernetes.io/name: zookeeper-operator app.kubernetes.io/instance: zookeeper-operator - app.kubernetes.io/version: "0.10.0" + app.kubernetes.io/version: "23.1.0" diff --git a/deploy/experimental/olm/manifests/csv.yaml b/deploy/olm/23.1.0/manifests/csv.yaml similarity index 95% rename from deploy/experimental/olm/manifests/csv.yaml rename to deploy/olm/23.1.0/manifests/csv.yaml index ae0dec83..14996a53 100644 --- a/deploy/experimental/olm/manifests/csv.yaml +++ b/deploy/olm/23.1.0/manifests/csv.yaml @@ -2,7 +2,7 @@ apiVersion: operators.coreos.com/v1alpha1 kind: ClusterServiceVersion metadata: - name: zookeeper-operator.v0.10.0 + name: zookeeper-operator.v23.1.0 spec: annotations: support: stackable.tech @@ -27,7 +27,7 @@ spec: provider: name: Stackable GmbH url: https://stackable.tech - version: 0.10.0 + version: 23.1.0 minKubeVersion: 1.20.0 installModes: @@ -37,7 +37,7 @@ spec: type: SingleNamespace - supported: false type: MultiNamespace - - supported: true + - supported: false type: AllNamespaces customresourcedefinitions: @@ -184,6 +184,14 @@ spec: - zookeeperclusters/status verbs: - patch + - apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + resourceNames: + - hostmount-anyuid + verbs: + - use deployments: - name: zookeeper-operator @@ -206,7 +214,7 @@ spec: containers: - name: zookeeper-operator securityContext: {} - image: "docker.stackable.tech/stackable/zookeeper-operator:0.10.0" + image: "docker.stackable.tech/stackable/zookeeper-operator:23.1.0" imagePullPolicy: IfNotPresent resources: {} volumeMounts: diff --git a/deploy/experimental/olm/manifests/roles.yaml b/deploy/olm/23.1.0/manifests/roles.yaml similarity index 93% rename from deploy/experimental/olm/manifests/roles.yaml rename to deploy/olm/23.1.0/manifests/roles.yaml index ee1fc3be..554fc9e4 100644 --- a/deploy/experimental/olm/manifests/roles.yaml +++ b/deploy/olm/23.1.0/manifests/roles.yaml @@ -23,6 +23,6 @@ rules: resources: - securitycontextconstraints resourceNames: - - hostmount-anyuid + - stackable-platform-scc verbs: - use diff --git a/deploy/olm/23.1.0/manifests/zkcluster.yaml b/deploy/olm/23.1.0/manifests/zkcluster.yaml new file mode 100644 index 00000000..0c2cb076 --- /dev/null +++ b/deploy/olm/23.1.0/manifests/zkcluster.yaml @@ -0,0 +1,839 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: zookeeperclusters.zookeeper.stackable.tech + annotations: + helm.sh/resource-policy: keep +spec: + group: zookeeper.stackable.tech + names: + categories: [] + kind: ZookeeperCluster + plural: zookeeperclusters + shortNames: + - zk + singular: zookeepercluster + scope: Namespaced + versions: + - additionalPrinterColumns: [] + name: v1alpha1 + schema: + openAPIV3Schema: + description: Auto-generated derived type for ZookeeperClusterSpec via `CustomResource` + properties: + spec: + description: A cluster of ZooKeeper nodes + properties: + clusterConfig: + default: + authentication: [] + tls: + quorumSecretClass: tls + serverSecretClass: tls + description: Global ZooKeeper cluster configuration that applies to all roles and role groups. + properties: + authentication: + default: [] + description: Authentication class settings for ZooKeeper like mTLS authentication. + items: + properties: + authenticationClass: + description: |- + The AuthenticationClass to use. + + ## mTLS + + Only affects client connections. This setting controls: - If clients need to authenticate themselves against the server via TLS - Which ca.crt to use when validating the provided client certs This will override the server TLS settings (if set) in `spec.clusterConfig.tls.serverSecretClass`. + type: string + required: + - authenticationClass + type: object + type: array + logging: + description: Logging options for ZooKeeper. + nullable: true + properties: + vectorAggregatorConfigMapName: + description: Name of the Vector discovery ConfigMap. It must contain the key `ADDRESS` with the address of the Vector aggregator. + nullable: true + type: string + type: object + tls: + default: + quorumSecretClass: tls + serverSecretClass: tls + description: TLS encryption settings for ZooKeeper (server, quorum). + nullable: true + properties: + quorumSecretClass: + default: tls + description: 'The to use for internal quorum communication. Use mutual verification between Zookeeper Nodes (mandatory). This setting controls: - Which cert the servers should use to authenticate themselves against other servers - Which ca.crt to use when validating the other server Defaults to `tls`' + type: string + serverSecretClass: + default: tls + description: 'The to use for client connections. This setting controls: - If TLS encryption is used at all - Which cert the servers should use to authenticate themselves against the client Defaults to `tls`.' + nullable: true + type: string + type: object + type: object + image: + anyOf: + - required: + - custom + - productVersion + - required: + - productVersion + - stackableVersion + description: Desired ZooKeeper image to use. + properties: + custom: + description: Overwrite the docker image. Specify the full docker image name, e.g. `docker.stackable.tech/stackable/superset:1.4.1-stackable2.1.0` + type: string + productVersion: + description: Version of the product, e.g. `1.4.1`. + type: string + pullPolicy: + default: IfNotPresent + description: '[Pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) used when pulling the Images' + enum: + - IfNotPresent + - Always + - Never + type: string + pullSecrets: + description: '[Image pull secrets](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) to pull images from a private registry' + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + type: object + nullable: true + type: array + repo: + description: Name of the docker repo, e.g. `docker.stackable.tech/stackable` + nullable: true + type: string + stackableVersion: + description: Stackable version of the product, e.g. 2.1.0 + type: string + type: object + servers: + description: ZooKeeper server configuration. + nullable: true + properties: + cliOverrides: + additionalProperties: + type: string + default: {} + type: object + config: + default: {} + properties: + initLimit: + format: uint32 + minimum: 0.0 + nullable: true + type: integer + logging: + default: + enableVectorAgent: null + containers: {} + properties: + containers: + additionalProperties: + anyOf: + - required: + - custom + - {} + description: Fragment derived from `ContainerLogConfigChoice` + properties: + console: + nullable: true + properties: + level: + description: Log levels + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - NONE + nullable: true + type: string + type: object + custom: + description: Custom log configuration provided in a ConfigMap + properties: + configMap: + nullable: true + type: string + type: object + file: + nullable: true + properties: + level: + description: Log levels + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - NONE + nullable: true + type: string + type: object + loggers: + additionalProperties: + properties: + level: + description: Log levels + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - NONE + nullable: true + type: string + type: object + default: {} + type: object + type: object + type: object + enableVectorAgent: + nullable: true + type: boolean + type: object + myidOffset: + format: uint16 + minimum: 0.0 + nullable: true + type: integer + resources: + default: + memory: + limit: null + runtimeLimits: {} + cpu: + min: null + max: null + storage: + data: + capacity: null + properties: + cpu: + default: + min: null + max: null + properties: + max: + description: |- + Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. + + The serialization format is: + + ::= + (Note that may be empty, from the "" case in .) + ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei + (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) + ::= m | "" | k | M | G | T | P | E + (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) + ::= "e" | "E" + + No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. + + When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. + + Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: + a. No precision is lost + b. No fractional digits will be emitted + c. The exponent (or suffix) is as large as possible. + The sign will be omitted unless the number is negative. + + Examples: + 1.5 will be serialized as "1500m" + 1.5Gi will be serialized as "1536Mi" + + Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. + + Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) + + This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + nullable: true + type: string + min: + description: |- + Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. + + The serialization format is: + + ::= + (Note that may be empty, from the "" case in .) + ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei + (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) + ::= m | "" | k | M | G | T | P | E + (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) + ::= "e" | "E" + + No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. + + When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. + + Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: + a. No precision is lost + b. No fractional digits will be emitted + c. The exponent (or suffix) is as large as possible. + The sign will be omitted unless the number is negative. + + Examples: + 1.5 will be serialized as "1500m" + 1.5Gi will be serialized as "1536Mi" + + Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. + + Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) + + This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + nullable: true + type: string + type: object + memory: + properties: + limit: + description: |- + Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. + + The serialization format is: + + ::= + (Note that may be empty, from the "" case in .) + ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei + (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) + ::= m | "" | k | M | G | T | P | E + (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) + ::= "e" | "E" + + No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. + + When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. + + Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: + a. No precision is lost + b. No fractional digits will be emitted + c. The exponent (or suffix) is as large as possible. + The sign will be omitted unless the number is negative. + + Examples: + 1.5 will be serialized as "1500m" + 1.5Gi will be serialized as "1536Mi" + + Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. + + Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) + + This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + nullable: true + type: string + runtimeLimits: + type: object + type: object + storage: + properties: + data: + default: + capacity: null + properties: + capacity: + description: |- + Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. + + The serialization format is: + + ::= + (Note that may be empty, from the "" case in .) + ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei + (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) + ::= m | "" | k | M | G | T | P | E + (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) + ::= "e" | "E" + + No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. + + When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. + + Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: + a. No precision is lost + b. No fractional digits will be emitted + c. The exponent (or suffix) is as large as possible. + The sign will be omitted unless the number is negative. + + Examples: + 1.5 will be serialized as "1500m" + 1.5Gi will be serialized as "1536Mi" + + Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. + + Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) + + This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + nullable: true + type: string + selectors: + description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. + nullable: true + 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 + storageClass: + nullable: true + type: string + type: object + type: object + type: object + syncLimit: + format: uint32 + minimum: 0.0 + nullable: true + type: integer + tickTime: + format: uint32 + minimum: 0.0 + nullable: true + type: integer + type: object + configOverrides: + additionalProperties: + additionalProperties: + type: string + type: object + default: {} + type: object + envOverrides: + additionalProperties: + type: string + default: {} + type: object + roleGroups: + additionalProperties: + properties: + cliOverrides: + additionalProperties: + type: string + default: {} + type: object + config: + default: {} + properties: + initLimit: + format: uint32 + minimum: 0.0 + nullable: true + type: integer + logging: + default: + enableVectorAgent: null + containers: {} + properties: + containers: + additionalProperties: + anyOf: + - required: + - custom + - {} + description: Fragment derived from `ContainerLogConfigChoice` + properties: + console: + nullable: true + properties: + level: + description: Log levels + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - NONE + nullable: true + type: string + type: object + custom: + description: Custom log configuration provided in a ConfigMap + properties: + configMap: + nullable: true + type: string + type: object + file: + nullable: true + properties: + level: + description: Log levels + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - NONE + nullable: true + type: string + type: object + loggers: + additionalProperties: + properties: + level: + description: Log levels + enum: + - TRACE + - DEBUG + - INFO + - WARN + - ERROR + - FATAL + - NONE + nullable: true + type: string + type: object + default: {} + type: object + type: object + type: object + enableVectorAgent: + nullable: true + type: boolean + type: object + myidOffset: + format: uint16 + minimum: 0.0 + nullable: true + type: integer + resources: + default: + memory: + limit: null + runtimeLimits: {} + cpu: + min: null + max: null + storage: + data: + capacity: null + properties: + cpu: + default: + min: null + max: null + properties: + max: + description: |- + Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. + + The serialization format is: + + ::= + (Note that may be empty, from the "" case in .) + ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei + (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) + ::= m | "" | k | M | G | T | P | E + (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) + ::= "e" | "E" + + No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. + + When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. + + Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: + a. No precision is lost + b. No fractional digits will be emitted + c. The exponent (or suffix) is as large as possible. + The sign will be omitted unless the number is negative. + + Examples: + 1.5 will be serialized as "1500m" + 1.5Gi will be serialized as "1536Mi" + + Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. + + Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) + + This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + nullable: true + type: string + min: + description: |- + Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. + + The serialization format is: + + ::= + (Note that may be empty, from the "" case in .) + ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei + (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) + ::= m | "" | k | M | G | T | P | E + (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) + ::= "e" | "E" + + No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. + + When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. + + Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: + a. No precision is lost + b. No fractional digits will be emitted + c. The exponent (or suffix) is as large as possible. + The sign will be omitted unless the number is negative. + + Examples: + 1.5 will be serialized as "1500m" + 1.5Gi will be serialized as "1536Mi" + + Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. + + Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) + + This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + nullable: true + type: string + type: object + memory: + properties: + limit: + description: |- + Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. + + The serialization format is: + + ::= + (Note that may be empty, from the "" case in .) + ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei + (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) + ::= m | "" | k | M | G | T | P | E + (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) + ::= "e" | "E" + + No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. + + When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. + + Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: + a. No precision is lost + b. No fractional digits will be emitted + c. The exponent (or suffix) is as large as possible. + The sign will be omitted unless the number is negative. + + Examples: + 1.5 will be serialized as "1500m" + 1.5Gi will be serialized as "1536Mi" + + Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. + + Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) + + This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + nullable: true + type: string + runtimeLimits: + type: object + type: object + storage: + properties: + data: + default: + capacity: null + properties: + capacity: + description: |- + Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. + + The serialization format is: + + ::= + (Note that may be empty, from the "" case in .) + ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei + (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) + ::= m | "" | k | M | G | T | P | E + (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) + ::= "e" | "E" + + No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. + + When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. + + Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: + a. No precision is lost + b. No fractional digits will be emitted + c. The exponent (or suffix) is as large as possible. + The sign will be omitted unless the number is negative. + + Examples: + 1.5 will be serialized as "1500m" + 1.5Gi will be serialized as "1536Mi" + + Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. + + Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) + + This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. + nullable: true + type: string + selectors: + description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. + nullable: true + 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 + storageClass: + nullable: true + type: string + type: object + type: object + type: object + syncLimit: + format: uint32 + minimum: 0.0 + nullable: true + type: integer + tickTime: + format: uint32 + minimum: 0.0 + nullable: true + type: integer + type: object + configOverrides: + additionalProperties: + additionalProperties: + type: string + type: object + default: {} + type: object + envOverrides: + additionalProperties: + type: string + default: {} + type: object + replicas: + format: uint16 + minimum: 0.0 + nullable: true + type: integer + selector: + description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. + nullable: true + 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 + type: object + type: object + required: + - roleGroups + type: object + stopped: + description: Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would). + nullable: true + type: boolean + required: + - image + type: object + status: + nullable: true + properties: + discoveryHash: + description: An opaque value that changes every time a discovery detail does + nullable: true + type: string + type: object + required: + - spec + title: ZookeeperCluster + type: object + served: true + storage: true + subresources: + status: {} diff --git a/deploy/olm/23.1.0/manifests/zknode.yaml b/deploy/olm/23.1.0/manifests/zknode.yaml new file mode 100644 index 00000000..c84add03 --- /dev/null +++ b/deploy/olm/23.1.0/manifests/zknode.yaml @@ -0,0 +1,62 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: zookeeperznodes.zookeeper.stackable.tech + annotations: + helm.sh/resource-policy: keep +spec: + group: zookeeper.stackable.tech + names: + categories: [] + kind: ZookeeperZnode + plural: zookeeperznodes + shortNames: + - zno + - znode + singular: zookeeperznode + scope: Namespaced + versions: + - additionalPrinterColumns: [] + name: v1alpha1 + schema: + openAPIV3Schema: + description: Auto-generated derived type for ZookeeperZnodeSpec via `CustomResource` + properties: + spec: + description: |- + A claim for a single ZooKeeper ZNode tree (filesystem node) + + A `ConfigMap` will automatically be created with the same name, containing the connection string in the field `ZOOKEEPER`. Each `ZookeeperZnode` gets an isolated ZNode chroot, which the `ZOOKEEPER` automatically contains. All data inside of this chroot will be deleted when the corresponding `ZookeeperZnode` is. + + `ZookeeperZnode` is *not* designed to manage the contents of this ZNode. Instead, it should be used to create a chroot for an installation of an application to work inside. Initializing the contents is the responsibility of the application. + properties: + clusterRef: + default: + name: null + namespace: null + description: |- + A reference to a product cluster (for example, a `ZookeeperCluster`) + + `namespace`'s defaulting only applies when retrieved via [`ClusterRef::namespace_relative_from`] + properties: + name: + description: The name of the cluster + nullable: true + type: string + namespace: + description: |- + The namespace of the cluster + + This field is optional, and will default to the namespace of the referring object. + nullable: true + type: string + type: object + type: object + required: + - spec + title: ZookeeperZnode + type: object + served: true + storage: true + subresources: {} diff --git a/deploy/olm/bundle.sh b/deploy/olm/bundle.sh new file mode 100755 index 00000000..76d302c3 --- /dev/null +++ b/deploy/olm/bundle.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# usage: bundle.sh , called from base folder: +# e.g. ./deploy/olm/bundle.sh 23.1.0 + +set -euo pipefail +set -x + +OPERATOR_NAME="zookeeper-operator" + +bundle-clean() { + rm -rf "deploy/olm/${VERSION}/bundle" + rm -rf "deploy/olm/${VERSION}/bundle.Dockerfile" +} + + +build-bundle() { + opm alpha bundle generate --directory manifests --package "${OPERATOR_NAME}-package" --output-dir bundle --channels stable --default stable + docker build -t "docker.stackable.tech/stackable/${OPERATOR_NAME}-bundle:${VERSION}" -f bundle.Dockerfile . + docker push "docker.stackable.tech/stackable/${OPERATOR_NAME}-bundle:${VERSION}" + opm alpha bundle validate --tag "docker.stackable.tech/stackable/${OPERATOR_NAME}-bundle:${VERSION}" --image-builder docker +} + +main() { + VERSION="$1"; + + pushd "deploy/olm/${VERSION}" + bundle-clean + build-bundle + popd +} + +main "$@" \ No newline at end of file From bb7c7a0a1d8006b5e25d164e318200eb5b7723e7 Mon Sep 17 00:00:00 2001 From: Felix Hennig Date: Mon, 20 Feb 2023 15:01:26 +0000 Subject: [PATCH 6/7] Added files to enable docs tests (#646) # Description *Please add a description here. This will become the commit message of the merge request later.* --- .../examples/getting_started/code/getting_started.sh | 2 ++ .../examples/getting_started/code/getting_started.sh.j2 | 2 ++ .../getting_started/code/test_getting_started_helm.sh | 6 ++++++ .../code/test_getting_started_stackablectl.sh | 6 ++++++ 4 files changed, 16 insertions(+) create mode 100755 docs/modules/zookeeper/examples/getting_started/code/test_getting_started_helm.sh create mode 100755 docs/modules/zookeeper/examples/getting_started/code/test_getting_started_stackablectl.sh diff --git a/docs/modules/zookeeper/examples/getting_started/code/getting_started.sh b/docs/modules/zookeeper/examples/getting_started/code/getting_started.sh index ea470cec..7d184f32 100755 --- a/docs/modules/zookeeper/examples/getting_started/code/getting_started.sh +++ b/docs/modules/zookeeper/examples/getting_started/code/getting_started.sh @@ -12,6 +12,8 @@ then exit 1 fi +cd "$(dirname "$0")" + case "$1" in "helm") echo "Adding 'stackable-dev' Helm Chart repository" diff --git a/docs/modules/zookeeper/examples/getting_started/code/getting_started.sh.j2 b/docs/modules/zookeeper/examples/getting_started/code/getting_started.sh.j2 index 4efeb684..e8314680 100755 --- a/docs/modules/zookeeper/examples/getting_started/code/getting_started.sh.j2 +++ b/docs/modules/zookeeper/examples/getting_started/code/getting_started.sh.j2 @@ -12,6 +12,8 @@ then exit 1 fi +cd "$(dirname "$0")" + case "$1" in "helm") echo "Adding 'stackable-dev' Helm Chart repository" diff --git a/docs/modules/zookeeper/examples/getting_started/code/test_getting_started_helm.sh b/docs/modules/zookeeper/examples/getting_started/code/test_getting_started_helm.sh new file mode 100755 index 00000000..b936b1d8 --- /dev/null +++ b/docs/modules/zookeeper/examples/getting_started/code/test_getting_started_helm.sh @@ -0,0 +1,6 @@ +#! /usr/bin/env bash +set -euo pipefail + +cd "$(dirname "$0")" +./getting_started.sh helm + diff --git a/docs/modules/zookeeper/examples/getting_started/code/test_getting_started_stackablectl.sh b/docs/modules/zookeeper/examples/getting_started/code/test_getting_started_stackablectl.sh new file mode 100755 index 00000000..147a7276 --- /dev/null +++ b/docs/modules/zookeeper/examples/getting_started/code/test_getting_started_stackablectl.sh @@ -0,0 +1,6 @@ +#! /usr/bin/env bash +set -euo pipefail + +cd "$(dirname "$0")" +./getting_started.sh stackablectl + From 011af708f63e70c6ad0e246ffeb9977f020c4a53 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:48:18 +0100 Subject: [PATCH 7/7] Update CHANGELOG --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70fad3d2..cdde5d79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Changelog +#h Changelog All notable changes to this project will be documented in this file. @@ -28,6 +28,7 @@ All notable changes to this project will be documented in this file. - Don't run init container as root and avoid chmod and chowning ([#603]). - Fixed the RoleGroup `selector`. It was not used before. ([#611]). - [BREAKING] Moved `spec.authentication`, `spec.tls` and `spec.logging` to `spec.clusterConfig`. Consolidated sub field names like `tls.client.secretClass` to `tls.serverSecretClass` ([#612]). +- Changes to be compatible with crate2nix ([#638]) [#586]: https://github.com/stackabletech/zookeeper-operator/pull/586 [#591]: https://github.com/stackabletech/zookeeper-operator/pull/591 @@ -37,6 +38,7 @@ All notable changes to this project will be documented in this file. [#603]: https://github.com/stackabletech/zookeeper-operator/pull/603 [#611]: https://github.com/stackabletech/zookeeper-operator/pull/611 [#612]: https://github.com/stackabletech/zookeeper-operator/pull/612 +[#638]: https://github.com/stackabletech/zookeeper-operator/pull/638 ## [0.12.0] - 2022-11-07