Skip to content

Commit

Permalink
Add registry-presets for private registry (#243)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Oct 26, 2023
1 parent 75def83 commit 4f57288
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: clusterchartpresets.charts.x-helm.dev
spec:
group: charts.x-helm.dev
names:
kind: ClusterChartPreset
listKind: ClusterChartPresetList
plural: clusterchartpresets
singular: clusterchartpreset
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ClusterChartPreset is the Schema for the clusterchartpresets
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ClusterChartPresetSpec defines the desired state of ClusterChartPreset
properties:
values:
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
type: object
served: true
storage: true
subresources:
status: {}
11 changes: 11 additions & 0 deletions charts/ace-installer/templates/presets/registry-presets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ $vals := dict "image" $.Values.image "registry" $.Values.registry "helm" dict }}
{{ $_ := set $vals.helm "repositories" (dig "repositories" dict $.Values.helm) }}
{{ $_ := mergeOverwrite $vals.helm.repositories (dig "releases" "opscenter-features" "values" "helm" "repositories" dict $.Values.helm) }}

apiVersion: charts.x-helm.dev/v1alpha1
kind: ClusterChartPreset
metadata:
name: registry-presets
spec:
values:
{{- toYaml $vals | nindent 4 }}

0 comments on commit 4f57288

Please sign in to comment.