Skip to content

Commit 58e0bdd

Browse files
committed
Add optional in-cluster registry proxy to ace-installer chart
Add an optional CNCF Distribution (registry:3) pull-through cache to the ace-installer chart, gated behind regproxy.enabled (default false). When enabled it proxies the upstream registry (ghcr.io by default) so that ghcr.io/appscode-charts images can be served from within the cluster. Also add an appscode-wizards-oci HelmRepository, used by the platform UI deploy wizards. It defaults to the same upstream as appscode-charts-oci (oci://ghcr.io/appscode-charts). When regproxy.enabled is true, its URL is rewritten to the in-cluster proxy service so wizard chart pulls are served from the cache. The proxy serves plain HTTP, so the repository is marked insecure in that case. The cache image is ghcr.io/appscode-images/registry:3. Document that charts/ace-installer-certified and ace-installer-certified-crds are generated from charts/ace-installer via chart-packer and must not be edited directly. Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 802ccc5 commit 58e0bdd

32 files changed

Lines changed: 2622 additions & 315 deletions

File tree

AGENTS.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,12 @@ Helpers (invoked outside Make):
4444
- License: `LICENSE.md`. Sign off commits (`git commit -s`).
4545
- Vendor directory is checked in; keep `go mod tidy && go mod vendor` clean.
4646
- CRDs for charts are imported via `import-crds.sh`; don't hand-author `charts/*/crds/*.yaml`.
47-
- `-certified` charts mirror the standard charts for Red Hat certification — bumps must apply to both.
47+
- `-certified` charts mirror the standard charts for Red Hat certification. `charts/ace-installer-certified` and `charts/ace-installer-certified-crds` are **generated** — do not edit them directly. After changing `charts/ace-installer`, regenerate them with:
48+
49+
```sh
50+
rm -rf charts/ace-installer-certified charts/ace-installer-certified-crds
51+
chart-packer crd-less --input charts/ace-installer --output charts
52+
chart-packer crd-only --input charts/ace-installer --output charts
53+
make gen-chart-doc
54+
```
4855
- Adding a new chart: create `charts/<name>/`, add a values-schema Go type under `apis/installer/v1alpha1/`, list images in `imagelist.yaml`, then run `make gen`.

apis/installer/v1alpha1/ace_installer_types.go

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,59 @@ type AceInstallerSpec struct {
5858
SelfManagement configapi.SelfManagement `json:"selfManagement"`
5959
Precheck AceInstallerPrecheckSpec `json:"precheck"`
6060
Tester AceInstallerPodSpec `json:"tester"`
61+
// Regproxy configures an optional in-cluster pull-through Docker registry
62+
// cache (CNCF Distribution / registry:3). When enabled, it transparently
63+
// proxies images from the upstream registry (ghcr.io by default), so that
64+
// ghcr.io/appscode-charts images can be served from within the cluster.
65+
Regproxy Regproxy `json:"regproxy"`
6166
// +optional
6267
Options string `json:"options"`
6368
}
6469

70+
// Regproxy is an optional in-cluster pull-through Docker registry cache
71+
// (CNCF Distribution / registry:3).
72+
type Regproxy struct {
73+
Enabled bool `json:"enabled"`
74+
ReplicaCount int `json:"replicaCount"`
75+
Image ImageReference `json:"image"`
76+
// RemoteURL is the upstream registry that this instance proxies as a
77+
// pull-through cache.
78+
RemoteURL string `json:"remoteURL"`
79+
// Username is an optional credential for authenticating against the
80+
// upstream registry. Leave empty for anonymous pulls.
81+
//+optional
82+
Username string `json:"username"`
83+
// Password is an optional credential for authenticating against the
84+
// upstream registry. Leave empty for anonymous pulls.
85+
//+optional
86+
Password string `json:"password"`
87+
//+optional
88+
PodAnnotations map[string]string `json:"podAnnotations"`
89+
//+optional
90+
PodSecurityContext *core.PodSecurityContext `json:"podSecurityContext"`
91+
//+optional
92+
SecurityContext *core.SecurityContext `json:"securityContext"`
93+
Service AceServiceSpec `json:"service"`
94+
Persistence RegproxyPersistence `json:"persistence"`
95+
//+optional
96+
Resources core.ResourceRequirements `json:"resources"`
97+
//+optional
98+
NodeSelector map[string]string `json:"nodeSelector"`
99+
// If specified, the pod's tolerations.
100+
//+optional
101+
Tolerations []core.Toleration `json:"tolerations"`
102+
// If specified, the pod's scheduling constraints
103+
//+optional
104+
Affinity *core.Affinity `json:"affinity"`
105+
}
106+
107+
type RegproxyPersistence struct {
108+
Enabled bool `json:"enabled"`
109+
StorageClass string `json:"storageClass"`
110+
AccessMode string `json:"accessMode"`
111+
Size string `json:"size"`
112+
}
113+
65114
type AceInstallerPrecheckSpec struct {
66115
Enabled bool `json:"enabled"`
67116
AceInstallerPodSpec `json:",inline"`

apis/installer/v1alpha1/zz_generated.deepcopy.go

Lines changed: 72 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

catalog/imagelist.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
- alpine:3.20
22
- bats/bats:1.11.0
3+
- ghcr.io/appscode-images/registry:3
34
- ghcr.io/appscode/ace:v0.2.0
45
- ghcr.io/appscode/acerproxy:v0.2.0
56
- ghcr.io/appscode/aceshifter:v0.0.3

0 commit comments

Comments
 (0)