Skip to content

Conversation

@nightkr
Copy link
Contributor

@nightkr nightkr commented Jan 26, 2022

  • Enable templating for secret-operator
  • Fix -operator-operator in templates
  • Fix -operator-operator in folder names
  • Deploy as DaemonSet rather than Deployment
  • Set CSI_ENDPOINT env variable
  • CRD harmonization
bors bot pushed a commit to stackabletech/secret-operator that referenced this pull request Jan 27, 2022
Fixes #25 For now I applied the templating manually (from stackabletech/operator-templating#55, commit stackabletech/operator-templating@4fd238d) and adapted it for secret-operator by hand. These changes are contained in 878c4a6, and basically mean: - Deploying as a `DaemonSet` rather than a `Deployment` - Adding CSI sidecar containers - Running as root (at some point we might be able to get away with "just" adding a bunch of capabilities, but secret-operator will probably always require relatively elevated privileges) - Disabling product-config - Extracting the CRD by running `cargo run crd` rather than reading the file that `build.rs` creates (Nix doesn't allow access to files outside of the source tree) - Adapting to the `ClusterRole` rules that secret-operator requires Currently this branch contains both the `Dockerfile`- and Nix-based workflows for building the operator, but we should probably pick one at some point. Co-authored-by: Stacky McStackface <stackable-bot@users.noreply.github.com>
@nightkr
Copy link
Contributor Author

nightkr commented Mar 14, 2022

The remaining question here is harmonizing CRD YAML generation. The Makefile currently assumes that the operator's build.rs script will write the CRD YAML, which secret-op currently doesn't because Nix doesn't let it write outside of its build sandbox.

We could make this conditional ("only write the CRD when built outside of Nix"), but I'm disinclined to let them diverge too much, and this kind of code mutation is discouraged upstream (rule 1 of https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script is "Scripts should not modify any files outside of that [$OUT_DIR] directory.").

An alternative used by secret-op is to use the output of cargo run crd. This is already supported by all operators, but is somewhat slower (since it causes the check-manifests task to also do a cargo build). Most of this could be mitigated with caching, however.

@nightkr
Copy link
Contributor Author

nightkr commented Mar 14, 2022

After (so-far) unanimous agreement in Slack (https://stackable-workspace.slack.com/archives/C02FZ581UCD/p1647251421170359) I'm burning deploy/crd entirely.

stackable-bot added a commit to stackabletech/spark-operator that referenced this pull request Mar 16, 2022
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
stackable-bot added a commit to stackabletech/nifi-operator that referenced this pull request Mar 16, 2022
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
stackable-bot added a commit to stackabletech/hbase-operator that referenced this pull request Mar 16, 2022
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
stackable-bot added a commit to stackabletech/hdfs-operator that referenced this pull request Mar 16, 2022
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
stackable-bot added a commit to stackabletech/superset-operator that referenced this pull request Mar 16, 2022
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
stackable-bot added a commit to stackabletech/airflow-operator that referenced this pull request Mar 16, 2022
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
stackable-bot added a commit to stackabletech/druid-operator that referenced this pull request Mar 16, 2022
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
stackable-bot added a commit to stackabletech/secret-operator that referenced this pull request Mar 16, 2022
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
@sbernauer
Copy link
Member

FYI @teozkr this only works with non-snap version of yq. Snap version is silly and throws (file exists though)

Only FYI, fine for me ;)

make regenerate-charts rm -rf deploy/helm/superset-operator/configs rm -rf deploy/helm/superset-operator/crds mkdir -p deploy/manifests rm -rf $(find deploy/manifests -maxdepth 1 -mindepth 1 -not -name Kustomization) yq eval -i '.version = "0.4.0-nightly" | .appVersion = "0.4.0-nightly"' deploy/helm/superset-operator/Chart.yaml Error: stat deploy/helm/superset-operator/Chart.yaml: no such file or directory make: *** [Makefile:39: version] Error 1 
bors bot pushed a commit to stackabletech/opa-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/trino-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/druid-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/hive-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/hdfs-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/nifi-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/spark-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/superset-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/airflow-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
bors bot pushed a commit to stackabletech/hbase-operator that referenced this pull request Mar 17, 2022
Automatically created PR based on commit 9d3387ff20d362a8c78301c3993da29edd0e3f4b in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
nightkr added a commit to stackabletech/krb5-rs that referenced this pull request Jun 27, 2025
Fixes #25 For now I applied the templating manually (from stackabletech/operator-templating#55, commit stackabletech/operator-templating@4fd238d) and adapted it for secret-operator by hand. These changes are contained in 878c4a6176782450c068669638c92700ebcb65d7, and basically mean: - Deploying as a `DaemonSet` rather than a `Deployment` - Adding CSI sidecar containers - Running as root (at some point we might be able to get away with "just" adding a bunch of capabilities, but secret-operator will probably always require relatively elevated privileges) - Disabling product-config - Extracting the CRD by running `cargo run crd` rather than reading the file that `build.rs` creates (Nix doesn't allow access to files outside of the source tree) - Adapting to the `ClusterRole` rules that secret-operator requires Currently this branch contains both the `Dockerfile`- and Nix-based workflows for building the operator, but we should probably pick one at some point. Co-authored-by: Stacky McStackface <stackable-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants