Skip to content

Conversation

@galal-hussein
Copy link
Collaborator

The PR adds new field to cluster spec:

spec:
....
  privateRegistry:
    secretName: privateregistries
    tlsSecrets:
      ca:
        secretName: ca
      test:
        secretName: test

The controller will read the secret if specified for the privateRegistry and will add registries.yaml file in /opt/rancher/k3s/registry directory, the PR also adds the ability to upload certificates to be used by the registry configuration, each tlsSecrets item is expected to be a TLS type secret that has tls.crt and tls.key field, for each secret the controller will place two files in the directory: /opt/rancher/k3s/registry/ssl, for example with the configuration above, the controller will add the following files to the servers/agents pods:

/opt/rancher/k3s/registry/registries.yaml --> which has the content of registries.yaml item in privateregistries secret
/opt/rancher/k3s/registry/ssl/ca.crt --> which has the content of tls.crt item in ca secret
/opt/rancher/k3s/registry/ssl/ca.key --> which has the content of tls.key item in ca secret
/opt/rancher/k3s/registry/ssl/test.crt --> which has the content of tls.crt item in test secret
/opt/rancher/k3s/registry/ssl/test.key --> which has the content of tls.key item in test secret

Signed-off-by: galal-hussein <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 87.15596% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.81%. Comparing base (5b4f31e) to head (fbfa0c9).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/apis/k3k.io/v1beta1/zz_generated.deepcopy.go 57.14% 6 Missing ⚠️
pkg/controller/cluster/registry/registry.go 94.20% 2 Missing and 2 partials ⚠️
pkg/controller/cluster/agent/virtual.go 86.66% 1 Missing and 1 partial ⚠️
pkg/controller/cluster/server/server.go 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #570      +/-   ##
==========================================
- Coverage   59.54%   57.81%   -1.73%     
==========================================
  Files          56       57       +1     
  Lines        5255     5417     +162     
==========================================
+ Hits         3129     3132       +3     
- Misses       1839     1999     +160     
+ Partials      287      286       -1     
Flag Coverage Δ
cli 51.73% <3.66%> (-1.73%) ⬇️
controller 55.74% <87.15%> (-1.35%) ⬇️
e2e 55.74% <87.15%> (-1.35%) ⬇️
unit 35.37% <7.33%> (-0.96%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: galal-hussein <[email protected]>
Signed-off-by: galal-hussein <[email protected]>
@enrichman enrichman marked this pull request as draft November 21, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants