-
Notifications
You must be signed in to change notification settings - Fork 136
[cozystack-operator] Add deployment files #1761
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
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds an operator-based deployment path: Makefile targets to build/publish operator and packages (updating values.yaml), a Dockerfile for the operator, Helm templates to conditionally deploy the operator, gated CRDs, and values/example manifests to toggle between operator-managed and direct deployments. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as DevOps
participant Make as Makefile
participant Docker as Docker/Build
participant Reg as Registry
participant Helm as Helm
participant K8s as Kubernetes
rect rgb(210,240,220)
Note over Dev,Reg: Build & publish operator/packages
Dev->>Make: make update-version TAG=vX.Y
Make->>Make: write cozystackVersion to values.yaml
Dev->>Make: make image-operator
Make->>Docker: build cozystack-operator image
Docker->>Reg: push image -> returns digest
Make->>Make: update cozystackOperator.image (digest) in values.yaml
Dev->>Make: make image-packages
Make->>Reg: publish platform-packages -> returns digest
Make->>Make: update cozystackOperator.platformSourceUrl/ref in values.yaml
end
rect rgb(230,230,255)
Note over Helm,K8s: Deploy using Helm
Dev->>Helm: helm install/upgrade --values values.yaml
alt .Values.cozystackOperator.enabled == true
Helm->>K8s: create CRDs, Namespace, Deployment, PackageSource
K8s->>K8s: operator reconciles PackageSource -> installs packages
else
Helm->>K8s: create direct Cozystack resources (templates/cozystack.yaml)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @kvaps, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request lays the groundwork for deploying the Cozystack platform using a dedicated operator. It introduces all necessary Kubernetes deployment files, Docker build configurations, and Helm value adjustments to enable the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces deployment files for the cozystack-operator, including a Dockerfile, Kubernetes manifests, and Makefile targets. The changes are a good step towards automating the operator's deployment. However, I've identified several critical and high-severity issues that should be addressed. The most significant concerns are security-related in the Kubernetes manifests, such as granting cluster-admin permissions and using a privileged namespace, which violate the principle of least privilege. Additionally, there's a critical path error in a Helm template that will prevent CRDs from being installed, and the Dockerfile uses a non-existent Go version and runs as root. My review includes specific suggestions to fix these issues.
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
Show resolved
Hide resolved
7d48bb6 to
b049f01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (9)
packages/core/installer/images/cozystack-operator/Dockerfile (3)
1-1: Verify Go version exists.The Dockerfile specifies
golang:1.25-alpine, but this version may not exist yet. Please verify that Go 1.25 has been released and that the corresponding Docker image is available.What is the latest stable version of Go as of December 2025?
19-19: Verify Alpine version stability.The base image uses
alpine:3.22, which may be an unreleased or edge version. For production deployments, it's recommended to use a stable Alpine version.What is the latest stable version of Alpine Linux as of December 2025?
19-23: Run container as non-root user.The container runs as root, which is a security risk. Following the principle of least privilege, containers should run as a non-root user to limit the potential impact of a container breakout vulnerability.
🔎 Proposed fix
-FROM alpine:3.22 +FROM alpine:3.22 +RUN addgroup -S appgroup && adduser -S appuser -G appgroup COPY --from=builder /cozystack-operator /usr/bin/cozystack-operator +USER appuser + ENTRYPOINT ["/usr/bin/cozystack-operator"]packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore (1)
1-3: Fix misleading comment and remove leftover rule.The comment states "Exclude everything except src directory" but the file includes many other directories. Additionally, the
!src/**rule on line 3 appears to be a leftover from a different project structure, as there is nosrcdirectory at the root.🔎 Proposed fix
-# Exclude everything except src directory +# Exclude everything except Go source files and modules * -!src/** !api/** !cmd/** !hack/** !internal/** !packages/** !pkg/** !scripts/** !go.mod !go.sumpackages/core/installer/Makefile (1)
55-57: Refactor fragile command substitution with side effects.The
rmcommand executes inside theawkcommand substitution, which is fragile and difficult to debug. IfDIGESTis empty (e.g., if the log pattern doesn't match), the script continues silently without updatingvalues.yaml, potentially causing deployment issues.🔎 Proposed fix
export REPO="oci://$(REGISTRY)/platform-packages"; \ - export DIGEST=$$(awk -F@ '/artifact successfully pushed/ {print $$2}' images/cozystack-packages.log; rm -f images/cozystack-packages.log); \ - test -n "$$DIGEST" && yq -i '.cozystackOperator.platformSource = (strenv(REPO) + "@" + strenv(DIGEST))' values.yaml + export DIGEST=$$(awk -F@ '/artifact successfully pushed/ {print $$2}' images/cozystack-packages.log); \ + rm -f images/cozystack-packages.log; \ + if [ -z "$$DIGEST" ]; then \ + echo "Error: Failed to extract digest from flux push output"; \ + exit 1; \ + fi; \ + yq -i '.cozystackOperator.platformSource = (strenv(REPO) + "@" + strenv(DIGEST))' values.yamlpackages/core/installer/templates/cozystack-operator.yaml (4)
9-9: Avoid privileged namespace enforcement.Setting
pod-security.kubernetes.io/enforce: privilegeddisables all pod security admission controls for the namespace, allowing pods to run with full host privileges. This is a significant security risk and should be avoided.Consider using a more restrictive policy (e.g.,
baselineorrestricted) or applying elevated privileges only to specific pods that require them.
17-28: Grant minimal required permissions instead of cluster-admin.Binding the service account to
cluster-admingrants unrestricted superuser access to the entire cluster, violating the principle of least privilege. The operator should be granted only the specific permissions it requires.Create a dedicated
ClusterRolewith the minimum necessary permissions (e.g., managing specific CRDs, reading Secrets, managing Deployments) and bind the service account to that role instead.
58-58: Clarify empty health-probe-bind-address.Providing an empty value for
--health-probe-bind-addressis ambiguous. It's unclear whether this disables the health probe or causes it to fall back to a default, which could lead to unexpected behavior in health checking.🔎 Suggested fix
- - --health-probe-bind-address= + - --health-probe-bind-address=:8081
70-70: Justify hostNetwork requirement.Using
hostNetwork: truegrants the pod access to the node's network interface, bypassing network policies and increasing the attack surface. This should only be used if absolutely necessary and the reasons should be clearly documented.Please verify whether
hostNetworkis truly required for the operator to function, or if it can operate without this elevated privilege.
🧹 Nitpick comments (1)
packages/core/installer/example/platform.yaml (1)
12-17: Use placeholder values in example files.This example file contains what appears to be real infrastructure values (
dev5.infra.aenix.organd specific IP addresses). Example files should use placeholder or example values to avoid confusion and prevent accidental copy-paste of production infrastructure details.🔎 Suggested placeholders
publishing: - host: "dev5.infra.aenix.org" - apiServerEndpoint: "https://api.dev5.infra.aenix.org" + host: "example.com" + apiServerEndpoint: "https://api.example.com" externalIPs: - - 10.4.0.94 - - 10.4.0.179 - - 10.4.0.26 + - 10.0.0.1 + - 10.0.0.2 + - 10.0.0.3
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
packages/core/installer/Makefilepackages/core/installer/example/platform.yamlpackages/core/installer/images/cozystack-operator/Dockerfilepackages/core/installer/images/cozystack-operator/Dockerfile.dockerignorepackages/core/installer/templates/cozystack-operator.yamlpackages/core/installer/templates/cozystack.yamlpackages/core/installer/templates/crds.yamlpackages/core/installer/values.yaml
🧰 Additional context used
📓 Path-based instructions (2)
packages/core/**
📄 CodeRabbit inference engine (AGENTS.md)
Use Helm Chart umbrella pattern with vendored upstream charts in
charts/directory
Files:
packages/core/installer/templates/cozystack.yamlpackages/core/installer/images/cozystack-operator/Dockerfilepackages/core/installer/images/cozystack-operator/Dockerfile.dockerignorepackages/core/installer/values.yamlpackages/core/installer/Makefilepackages/core/installer/example/platform.yamlpackages/core/installer/templates/cozystack-operator.yamlpackages/core/installer/templates/crds.yaml
**/*.yaml
📄 CodeRabbit inference engine (AGENTS.md)
Do NOT directly edit upstream Helm charts in vendored charts directory; use proper chart vendoring mechanisms
Files:
packages/core/installer/templates/cozystack.yamlpackages/core/installer/values.yamlpackages/core/installer/example/platform.yamlpackages/core/installer/templates/cozystack-operator.yamlpackages/core/installer/templates/crds.yaml
🧠 Learnings (8)
📚 Learning: 2025-12-25T09:45:26.511Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.511Z
Learning: Applies to **/*.go : Do NOT manually edit vendor/ directory or auto-generated files (zz_generated.*.go)
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.511Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.511Z
Learning: Applies to pkg/**/*.go : Follow controller-runtime patterns and kubebuilder style for Go code in pkg directory
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.511Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.511Z
Learning: Applies to internal/**/*.go : Follow controller-runtime patterns and kubebuilder style for Go code in internal directory
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.511Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.511Z
Learning: Applies to cmd/**/*.go : Follow controller-runtime patterns and kubebuilder style for Go code in cmd directory
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.511Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.511Z
Learning: Applies to go.mod : Do NOT modify go.mod manually; use `go get` command instead
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.511Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.511Z
Learning: Applies to go.sum : Do NOT modify go.sum manually; use `go get` command instead
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-06-26T04:29:24.830Z
Learnt from: NickVolynkin
Repo: cozystack/cozystack PR: 1117
File: packages/apps/mysql/Makefile:8-8
Timestamp: 2025-06-26T04:29:24.830Z
Learning: The cozystack project uses yq v4+ on their CI runner, so yq v4 syntax (-o json --indent 4) is compatible and version checks are not needed.
Applied to files:
packages/core/installer/values.yaml
📚 Learning: 2025-12-25T09:45:26.511Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.511Z
Learning: Applies to api/** : Define Kubernetes CRDs in the api directory following kubebuilder conventions
Applied to files:
packages/core/installer/templates/crds.yaml
🪛 Hadolint (2.14.0)
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
[error] 2-2: unexpected '*'
expecting '#', '', ADD, ARG, CMD, COPY, ENTRYPOINT, ENV, EXPOSE, FROM, HEALTHCHECK, LABEL, MAINTAINER, ONBUILD, RUN, SHELL, STOPSIGNAL, USER, VOLUME, WORKDIR, a pragma, at least one space, or end of input
(DL1000)
🪛 YAMLlint (1.37.1)
packages/core/installer/templates/cozystack.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
packages/core/installer/templates/cozystack-operator.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
packages/core/installer/templates/crds.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
🔇 Additional comments (7)
packages/core/installer/templates/crds.yaml (1)
1-6: LGTM! Conditional CRD rendering is correctly implemented.The CRDs are now rendered only when the operator is enabled, and the path correctly references
definitions/*.yaml. The conditional logic aligns with the operator enablement pattern used throughout the PR.packages/core/installer/templates/cozystack.yaml (1)
1-81: LGTM! Conditional rendering provides backwards compatibility.The inverse condition (
if not .Values.cozystackOperator.enabled) correctly ensures this traditional deployment is rendered only when the operator is disabled, providing a clean mutual exclusion with the operator-based deployment.packages/core/installer/values.yaml (2)
3-7: LGTM! Image digests provide immutability.The new
cozystackOperatorconfiguration is well-structured with sensible defaults. Using image digests (sha256) alongside tags provides both human-readable references and cryptographic verification of image contents, which is a security best practice.
7-7: Consider implications of "latest" for cozystackVersion.The default value
latestmay lead to non-deterministic deployments if the operator resolves this at runtime. For production stability, consider whether a specific version should be set by default or if this is intentionally dynamic.packages/core/installer/Makefile (2)
31-33: LGTM! Clean version update target.The
update-versiontarget is straightforward and correctly updates thecozystackVersionfield using yq.
35-44: LGTM! Follows existing image build pattern.The
image-operatortarget correctly follows the same pattern as the existingimage-cozystacktarget, including Docker buildx, metadata extraction, and values.yaml updates.packages/core/installer/templates/cozystack-operator.yaml (1)
79-118: LGTM! PackageSource structure is well-organized.The PackageSource CRD definition with three variants (default, isp-full, isp-hosted) is well-structured and properly references the OCIRepository source. Each variant correctly specifies its install configuration and valuesFiles path.
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
b049f01 to
c43db3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (1)
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore (1)
1-3: Misleading comment and non-existent directory reference (already flagged).The past review already identified that line 1's comment is misleading and line 3 references a non-existent
srcdirectory. This should be corrected as previously suggested.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
packages/core/installer/Makefilepackages/core/installer/example/platform.yamlpackages/core/installer/images/cozystack-operator/Dockerfilepackages/core/installer/images/cozystack-operator/Dockerfile.dockerignorepackages/core/installer/templates/cozystack-operator.yamlpackages/core/installer/templates/cozystack.yamlpackages/core/installer/templates/crds.yamlpackages/core/installer/values.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/core/installer/example/platform.yaml
- packages/core/installer/Makefile
- packages/core/installer/images/cozystack-operator/Dockerfile
🧰 Additional context used
📓 Path-based instructions (2)
packages/core/**
📄 CodeRabbit inference engine (AGENTS.md)
Use Helm Chart umbrella pattern with vendored upstream charts in
charts/directory
Files:
packages/core/installer/values.yamlpackages/core/installer/templates/cozystack-operator.yamlpackages/core/installer/images/cozystack-operator/Dockerfile.dockerignorepackages/core/installer/templates/cozystack.yamlpackages/core/installer/templates/crds.yaml
**/*.yaml
📄 CodeRabbit inference engine (AGENTS.md)
Do NOT directly edit upstream Helm charts in vendored charts directory; use proper chart vendoring mechanisms
Files:
packages/core/installer/values.yamlpackages/core/installer/templates/cozystack-operator.yamlpackages/core/installer/templates/cozystack.yamlpackages/core/installer/templates/crds.yaml
🧠 Learnings (10)
📚 Learning: 2025-06-26T04:29:24.830Z
Learnt from: NickVolynkin
Repo: cozystack/cozystack PR: 1117
File: packages/apps/mysql/Makefile:8-8
Timestamp: 2025-06-26T04:29:24.830Z
Learning: The cozystack project uses yq v4+ on their CI runner, so yq v4 syntax (-o json --indent 4) is compatible and version checks are not needed.
Applied to files:
packages/core/installer/values.yaml
📚 Learning: 2025-12-25T15:24:47.730Z
Learnt from: kvaps
Repo: cozystack/cozystack PR: 1760
File: packages/core/platform/sources/velero.yaml:20-23
Timestamp: 2025-12-25T15:24:47.730Z
Learning: In Velero PackageSource configurations, the privileged: true setting is required for node-agents to function properly with hostPath access for backup operations.
Applied to files:
packages/core/installer/templates/cozystack-operator.yaml
📚 Learning: 2025-12-25T15:24:06.314Z
Learnt from: kvaps
Repo: cozystack/cozystack PR: 1760
File: packages/core/platform/sources/goldpinger.yaml:20-23
Timestamp: 2025-12-25T15:24:06.314Z
Learning: In the cozystack platform, Goldpinger is configured with privileged: true because it runs with hostNetwork=true to properly monitor network connectivity between nodes.
Applied to files:
packages/core/installer/templates/cozystack-operator.yaml
📚 Learning: 2025-12-25T09:45:26.524Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.524Z
Learning: Applies to **/*.go : Do NOT manually edit vendor/ directory or auto-generated files (zz_generated.*.go)
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.524Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.524Z
Learning: Applies to pkg/**/*.go : Follow controller-runtime patterns and kubebuilder style for Go code in pkg directory
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.524Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.524Z
Learning: Applies to internal/**/*.go : Follow controller-runtime patterns and kubebuilder style for Go code in internal directory
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.524Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.524Z
Learning: Applies to cmd/**/*.go : Follow controller-runtime patterns and kubebuilder style for Go code in cmd directory
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.524Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.524Z
Learning: Applies to go.mod : Do NOT modify go.mod manually; use `go get` command instead
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.524Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.524Z
Learning: Applies to go.sum : Do NOT modify go.sum manually; use `go get` command instead
Applied to files:
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
📚 Learning: 2025-12-25T09:45:26.524Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-25T09:45:26.524Z
Learning: Applies to api/** : Define Kubernetes CRDs in the api directory following kubebuilder conventions
Applied to files:
packages/core/installer/templates/crds.yaml
🪛 Hadolint (2.14.0)
packages/core/installer/images/cozystack-operator/Dockerfile.dockerignore
[error] 2-2: unexpected '*'
expecting '#', '', ADD, ARG, CMD, COPY, ENTRYPOINT, ENV, EXPOSE, FROM, HEALTHCHECK, LABEL, MAINTAINER, ONBUILD, RUN, SHELL, STOPSIGNAL, USER, VOLUME, WORKDIR, a pragma, at least one space, or end of input
(DL1000)
🪛 YAMLlint (1.37.1)
packages/core/installer/templates/cozystack-operator.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
packages/core/installer/templates/cozystack.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
packages/core/installer/templates/crds.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
🔇 Additional comments (4)
packages/core/installer/templates/cozystack.yaml (1)
1-1: LGTM: Conditional gating ensures mutual exclusivity.The conditional wrapper correctly ensures that the direct cozystack deployment resources are only rendered when the operator is disabled, maintaining mutual exclusivity with the operator-based deployment path.
Also applies to: 81-81
packages/core/installer/values.yaml (1)
3-8: LGTM: Sensible defaults with digest pinning.The new
cozystackOperatorconfiguration section provides sensible defaults (disabled by default for backward compatibility), proper image digest pinning for security, and structured platform source references.packages/core/installer/templates/crds.yaml (1)
1-6: LGTM: CRD gating aligned with operator deployment.The conditional rendering of CRDs when the operator is enabled is correct. The path
definitions/*.yaml(line 2) is also correct, addressing the past review concern about a non-existentcrds/directory.packages/core/installer/templates/cozystack-operator.yaml (1)
82-90: Verify that the cozystack-operator creates the OCIRepository resource.The PackageSource references an OCIRepository named
cozystack-packagesin thecozy-systemnamespace (lines 88-90), but this resource is not defined in any Helm template. The operator receives the platform source configuration via--platform-source-urland--platform-source-refarguments, suggesting it may create the OCIRepository dynamically during initialization. Confirm in the operator code that this resource is created based on these initialization arguments, or document the creation mechanism.
| {{- if .Values.cozystackOperator.disableTelemetry }} | ||
| - --disable-telemetry | ||
| {{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
rg -n 'disableTelemetry' packages/core/installer/Repository: cozystack/cozystack
Length of output: 184
🏁 Script executed:
cat -n packages/core/installer/values.yaml | head -50Repository: cozystack/cozystack
Length of output: 631
Add disableTelemetry field to values.yaml for clarity.
The template on line 60 references .Values.cozystackOperator.disableTelemetry, but this field is not defined in values.yaml. While Helm handles missing values gracefully (treating them as falsy), adding this field explicitly with a default value (e.g., disableTelemetry: false) improves discoverability and makes the configuration option more accessible to users.
🤖 Prompt for AI Agents
In packages/core/installer/templates/cozystack-operator.yaml around lines 60 to
62, the template references .Values.cozystackOperator.disableTelemetry but
values.yaml does not declare this field; add a new entry under the
cozystackOperator section in values.yaml called disableTelemetry with a default
boolean (e.g., disableTelemetry: false) so the option is discoverable and
documented for users, and update any related README/config docs if present to
mention this new flag.
| - name: isp-full | ||
| components: | ||
| - install: | ||
| namespace: cozy-system | ||
| releaseName: cozystack-platform | ||
| name: cozystack-platform | ||
| path: core/platform | ||
| valuesFiles: | ||
| - values.yaml | ||
| - values-isp-full.yaml | ||
| - name: isp-hosted | ||
| components: | ||
| - install: | ||
| namespace: cozy-system | ||
| releaseName: cozystack-platform | ||
| name: cozystack-platform | ||
| path: core/platform | ||
| valuesFiles: | ||
| - values.yaml | ||
| - values-isp-hosted.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# First, let's understand the directory structure of packages/core
fd -type d -max-depth 2 'packages/core' .Repository: cozystack/cozystack
Length of output: 233
🏁 Script executed:
# List the contents of packages/core directory
ls -la packages/core/ 2>/dev/null | head -30Repository: cozystack/cozystack
Length of output: 453
🏁 Script executed:
# Check if platform directory exists and look for variant values files
find packages/core -name '*isp*.yaml' -o -name 'values*.yaml' | grep -E '(isp|values)' | sortRepository: cozystack/cozystack
Length of output: 199
🏁 Script executed:
# Let's also examine the cozystack-operator.yaml file to understand the full context
wc -l packages/core/installer/templates/cozystack-operator.yamlRepository: cozystack/cozystack
Length of output: 124
🏁 Script executed:
# Read the specific lines from the YAML file
sed -n '92,122p' packages/core/installer/templates/cozystack-operator.yamlRepository: cozystack/cozystack
Length of output: 797
🏁 Script executed:
# Also check the platform directory contents
find packages/core/platform -type f -name '*.yaml' | sortRepository: cozystack/cozystack
Length of output: 569
🏁 Script executed:
# Check what's in the platform directory
ls -la packages/core/platform/Repository: cozystack/cozystack
Length of output: 525
Create missing variant-specific values files in packages/core/platform/.
The PackageSource variants isp-full and isp-hosted reference overlay value files that do not exist:
values-isp-full.yaml(line 111)values-isp-hosted.yaml(line 121)
These files must be created in packages/core/platform/ to support the variant configurations. Verify the structure of existing bundle files and create corresponding values overlays for each variant.
🤖 Prompt for AI Agents
In packages/core/installer/templates/cozystack-operator.yaml around lines 102 to
121 the PackageSource variants reference two missing overlay files
(values-isp-full.yaml and values-isp-hosted.yaml); create these two files under
packages/core/platform/ named exactly values-isp-full.yaml and
values-isp-hosted.yaml, model their structure after the existing values.yaml and
any other variant overlays in the repo (apply only the variant-specific
overrides required for isp-full and isp-hosted), validate YAML syntax, and add
them to the repository so the PackageSource entries resolve correctly.
Signed-off-by: Andrei Kvapil <kvapss@gmail.com> <!-- Thank you for making a contribution! Here are some tips for you: - Start the PR title with the [label] of Cozystack component: - For system components: [platform], [system], [linstor], [cilium], [kube-ovn], [dashboard], [cluster-api], etc. - For managed apps: [apps], [tenant], [kubernetes], [postgres], [virtual-machine] etc. - For development and maintenance: [tests], [ci], [docs], [maintenance]. - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Add the label `backport` if it's a bugfix that needs to be backported to a previous version. --> <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same [label] as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note [cozystack-operator] Add deployment files ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **New Features** * Deployable CozyStack operator with configurable enablement, image, and platform-source settings * Operator-managed package source and variant-based platform installation options * **Chores** * Release/packaging targets added to automate image and package publishing and update manifests * Configuration schema extended to include operator-related fields and versioning controls <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…d backup system (#1867) ## What this PR does Update changelog for v1.0.0-alpha.1 to include missing features: - **Cozystack Operator**: New operator for Package and PackageSource management (#1740, #1741, #1755, #1756, #1760, #1761) - **Backup System**: Comprehensive backup functionality with Velero integration (#1640, #1685, #1687, #1708, #1719, #1720, #1737, #1762) - Add @androndo to contributors - Update Full Changelog link to v0.38.0...v1.0.0-alpha.1 ### Release note ```release-note [docs] Update changelog for v1.0.0-alpha.1: add cozystack-operator and backup system ```
Signed-off-by: Andrei Kvapil kvapss@gmail.com
What this PR does
Release note
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.