| #Input: { |
| network: #Network |
| subdomain: string |
| } |
| |
| input: #Input |
| |
| _domain: "\(input.subdomain).\(input.network.domain)" |
| |
| readme: "rpuppy application will be installed on \(input.network.name) network and be accessible to any user on https://\(_domain)" |
| |
| images: { |
| rpuppy: { |
| repository: "giolekva" |
| name: "rpuppy" |
| tag: "latest" |
| pullPolicy: "Always" |
| } |
| } |
| |
| charts: { |
| rpuppy: { |
| chart: "charts/rpuppy" |
| sourceRef: { |
| kind: "GitRepository" |
| name: "pcloud" |
| namespace: global.id |
| } |
| } |
| } |
| |
| helm: { |
| rpuppy: { |
| chart: charts.rpuppy |
| values: { |
| ingressClassName: input.network.ingressClass |
| certificateIssuer: input.network.certificateIssuer |
| domain: _domain |
| image: { |
| repository: images.rpuppy.fullName |
| tag: images.rpuppy.tag |
| pullPolicy: images.rpuppy.pullPolicy |
| } |
| } |
| } |
| } |
| |
| // TODO(gio): import |
| |
| #Network: { |
| name: string |
| ingressClass: string |
| certificateIssuer: string |
| domain: string |
| } |
| |
| #Image: { |
| registry: string | *"docker.io" |
| repository: string |
| name: string |
| tag: string |
| pullPolicy: string // TODO(gio): remove? |
| fullName: "\(registry)/\(repository)/\(name)" |
| fullNameWithTag: "\(fullName):\(tag)" |
| } |
| |
| #Chart: { |
| chart: string |
| sourceRef: #SourceRef |
| } |
| |
| #SourceRef: { |
| kind: "GitRepository" | "HelmRepository" |
| name: string |
| namespace: string // TODO(gio): default global.id |
| } |
| |
| #Global: { |
| id: string |
| ... |
| } |
| |
| #Release: { |
| namespace: string |
| } |
| |
| global: #Global |
| release: #Release |
| |
| images: { |
| for key, value in images { |
| "\(key)": #Image & value |
| } |
| } |
| |
| charts: { |
| for key, value in charts { |
| "\(key)": #Chart & value |
| } |
| } |
| |
| #HelmRelease: { |
| _name: string |
| _chart: #Chart |
| _values: _ |
| |
| apiVersion: "helm.toolkit.fluxcd.io/v2beta1" |
| kind: "HelmRelease" |
| metadata: { |
| name: _name |
| namespace: release.namespace |
| } |
| spec: { |
| interval: "1m0s" |
| chart: { |
| spec: _chart |
| } |
| values: _values |
| } |
| } |
| |
| output: { |
| for name, r in helm { |
| "\(name)": #HelmRelease & { |
| _name: name |
| _chart: r.chart |
| _values: r.values |
| } |
| } |
| } |