Skip to content

Commit

Permalink
Add createNamespace option (#351)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Apr 3, 2024
1 parent edeec44 commit bab4c78
Show file tree
Hide file tree
Showing 389 changed files with 17,377 additions and 2,057 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
BASEIMAGE_PROD ?= gcr.io/distroless/static-debian11
BASEIMAGE_DBG ?= debian:bullseye

GO_VERSION ?= 1.21
GO_VERSION ?= 1.22
BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)
CHART_TEST_IMAGE ?= quay.io/helmpack/chart-testing:v3.5.1

Expand Down
5 changes: 3 additions & 2 deletions apis/installer/v1alpha1/opscenter_features_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ type CapiMetadata struct {
}

type OpscenterHelmSpec struct {
Repositories map[string]*shared.HelmRepository `json:"repositories"`
Releases map[string]*HelmRelease `json:"releases"`
CreateNamespace bool `json:"createNamespace"`
Repositories map[string]*shared.HelmRepository `json:"repositories"`
Releases map[string]*HelmRelease `json:"releases"`
}

type HelmRelease struct {
Expand Down
1 change: 1 addition & 0 deletions charts/ace-installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The following table lists the configurable parameters of the `ace-installer` cha
| image.proxies.quay | quay.io/company/bin:tag | <code>quay.io</code> |
| image.proxies.kubernetes | registry.k8s.io/bin:tag | <code>registry.k8s.io</code> |
| registry.credentials | | <code>{}</code> |
| helm.createNamespace | | <code>true</code> |
| helm.repositories.appscode-charts-oci.url | | <code>oci://ghcr.io/appscode-charts</code> |
| helm.releases.ace.enabled | | <code>false</code> |
| helm.releases.ace.version | | <code>"v2024.4.2"</code> |
Expand Down
2 changes: 1 addition & 1 deletion charts/ace-installer/templates/apps/ace/ace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
targetNamespace: ace
storageNamespace: ace
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
targetNamespace: cert-manager
storageNamespace: cert-manager
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
targetNamespace: cert-manager
storageNamespace: cert-manager
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
targetNamespace: cert-manager
storageNamespace: cert-manager
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
targetNamespace: kubedb
storageNamespace: kubedb
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
2 changes: 1 addition & 1 deletion charts/ace-installer/templates/apps/kubedb/kubedb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
targetNamespace: kubedb
storageNamespace: kubedb
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
targetNamespace: kubeops
storageNamespace: kubeops
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
targetNamespace: kubeops
storageNamespace: kubeops
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
targetNamespace: kubeops
storageNamespace: kubeops
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
targetNamespace: kubeops
storageNamespace: kubeops
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
2 changes: 1 addition & 1 deletion charts/ace-installer/templates/apps/kubeops/reloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
targetNamespace: kubeops
storageNamespace: kubeops
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:
spec:
install:
crds: CreateReplace
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
remediation:
retries: -1
interval: 5m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
spec:
install:
crds: CreateReplace
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
remediation:
retries: -1
interval: 5m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
targetNamespace: monitoring
storageNamespace: monitoring
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:
spec:
install:
crds: CreateReplace
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
remediation:
retries: -1
interval: 5m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
targetNamespace: monitoring
storageNamespace: monitoring
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ metadata:
spec:
install:
crds: CreateReplace
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
remediation:
retries: -1
interval: 5m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
targetNamespace: envoy-gateway-system
storageNamespace: envoy-gateway-system
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

{{ $helmrepos := dig "repositories" dict $.Values.helm | deepCopy }}
{{ $_ := set $overrides.helm "repositories" $helmrepos }}
{{ $_ := set $overrides.helm "createNamespace" $.Values.helm.createNamespace }}

{{ $vals := dig "values" dict . }}
{{ $vals = mergeOverwrite $vals $overrides }}
Expand All @@ -24,7 +25,7 @@ spec:
targetNamespace: kubeops
storageNamespace: kubeops
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
2 changes: 1 addition & 1 deletion charts/ace-installer/templates/apps/stash/kubestash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
targetNamespace: stash
storageNamespace: stash
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
targetNamespace: stash
storageNamespace: stash
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
3 changes: 3 additions & 0 deletions charts/ace-installer/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ properties:
type: string
helm:
properties:
createNamespace:
type: boolean
releases:
additionalProperties:
properties:
Expand Down Expand Up @@ -54,6 +56,7 @@ properties:
type: object
type: object
required:
- createNamespace
- releases
- repositories
type: object
Expand Down
2 changes: 2 additions & 0 deletions charts/ace-installer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ registry:
# password: "xyz"

helm:
createNamespace: true

repositories:
# oci://harbor.appscode.ninja/ac/appscode-charts
appscode-charts-oci:
Expand Down
1 change: 1 addition & 0 deletions charts/ace-ocm-addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ The following table lists the configurable parameters of the `ace-ocm-addons` ch
| image.proxies.quay | quay.io/company/bin:tag | <code>quay.io</code> |
| image.proxies.kubernetes | registry.k8s.io/bin:tag | <code>registry.k8s.io</code> |
| registry.credentials | | <code>{}</code> |
| helm.createNamespace | | <code>true</code> |
| helm.repositories.appscode-charts-oci.url | | <code>oci://ghcr.io/appscode-charts</code> |
| helm.releases.kube-ui-server.enabled | | <code>true</code> |
| helm.releases.kube-ui-server.version | | <code>"v2023.12.20"</code> |
Expand Down
4 changes: 2 additions & 2 deletions charts/ace-ocm-addons/common/addon/manifestrelicaset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ spec:
targetNamespace: kubeops
storageNamespace: kubeops
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down Expand Up @@ -156,7 +156,7 @@ spec:
targetNamespace: kubeops
storageNamespace: kubeops
install:
createNamespace: true
createNamespace: {{ $.Values.helm.createNamespace }}
# crds: CreateReplace
remediation:
retries: -1
Expand Down
3 changes: 3 additions & 0 deletions charts/ace-ocm-addons/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ properties:
type: string
helm:
properties:
createNamespace:
type: boolean
releases:
additionalProperties:
properties:
Expand Down Expand Up @@ -50,6 +52,7 @@ properties:
type: object
type: object
required:
- createNamespace
- releases
- repositories
type: object
Expand Down
2 changes: 2 additions & 0 deletions charts/ace-ocm-addons/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ registry:
# password: "xyz"

helm:
createNamespace: true

repositories:
# oci://harbor.appscode.ninja/ac/appscode-charts
appscode-charts-oci:
Expand Down
1 change: 1 addition & 0 deletions charts/opscenter-features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ The following table lists the configurable parameters of the `opscenter-features
| image.proxies.quay | quay.io/company/bin:tag | <code>quay.io</code> |
| image.proxies.kubernetes | registry.k8s.io/bin:tag | <code>registry.k8s.io</code> |
| registry.credentials | | <code>{}</code> |
| helm.createNamespace | | <code>true</code> |
| helm.repositories.appscode-charts-oci.url | | <code>oci://ghcr.io/appscode-charts</code> |
| helm.releases.aws-ebs-csi-driver.version | | <code>"2.23.0"</code> |
| helm.releases.capa-vpc-peering-operator.version | | <code>"v2023.12.11"</code> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
chart:
name: crossplane
namespace: crossplane-system
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "crossplane" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
chart:
name: kubedb-provider-aws
namespace: crossplane-system
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "kubedb-provider-aws" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
chart:
name: kubedb-provider-azure
namespace: crossplane-system
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "kubedb-provider-azure" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
chart:
name: kubedb-provider-gcp
namespace: crossplane-system
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "kubedb-provider-gcp" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
chart:
name: aws-ebs-csi-driver
namespace: capa-system
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "aws-ebs-csi-driver" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ spec:
chart:
name: capa-vpc-peering-operator
namespace: crossplane-system
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "capa-vpc-peering-operator" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
chart:
name: capi-cluster-presets
namespace: capi-cluster
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "capi-cluster-presets" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
chart:
name: cluster-autoscaler
namespace: capi-system
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "cluster-autoscaler" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
chart:
name: capi-cluster-presets
namespace: capi-cluster
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "capi-cluster-presets" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
chart:
name: capi-cluster-presets
namespace: capi-cluster
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "capi-cluster-presets" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ spec:
chart:
name: ace-ocm-addons
namespace: open-cluster-management-addon
createNamespace: {{ $.Values.helm.createNamespace }}
version: {{ dig "ace-ocm-addons" "version" "" $.Values.helm.releases }}
sourceRef:
kind: HelmRepository
Expand Down
Loading

0 comments on commit bab4c78

Please sign in to comment.