-
- Notifications
You must be signed in to change notification settings - Fork 1
Enable templating for secret operator #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This ensures that the templates also work for non-product operators.
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>
| 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 |
| After (so-far) unanimous agreement in Slack (https://stackable-workspace.slack.com/archives/C02FZ581UCD/p1647251421170359) I'm burning |
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
…ackabletech/operator-templating repo. Triggered by: Manual run triggered by: teozkr with message [Enabled secret operator templating (stackabletech/operator-templating#55)]
| 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 ;) |
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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>
CSI_ENDPOINTenv variable