Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update manifests #68

Merged
merged 16 commits into from
May 3, 2022
4 changes: 2 additions & 2 deletions manifests/implementation/aws/elasticsearch/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ spec:
- AWS_ACCESS_KEY_ID=<@ aws.accessKeyID @>
- AWS_SECRET_ACCESS_KEY=<@ aws.secretAccessKey @>
output:
goTemplate:
goTemplate: |
arn: "{{ .arn }}"
domain_id: "{{ .domain_id }}"
domain_name: "{{ .domain_name }}"
Expand Down Expand Up @@ -416,7 +416,7 @@ spec:
- name: template
raw:
data: |
version: <@ input.elasticsearch_version @>
version: "<@ input.elasticsearch_version @>"
protocol: "https"
host: "<@ input.endpoint @>"
port: 443
Expand Down
4 changes: 2 additions & 2 deletions manifests/implementation/aws/rds/postgresql/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ spec:
ingress_rule_cidr_blocks = "<@ additionalinput.ingress_rule_cidr_blocks | default('0.0.0.0/0') @>"
tier = "<@ additionalinput.tier | default('db.t3.micro') @>"
publicly_accessible = <@ additionalinput.publicly_accessible | default(true) | tojson @>
engine_version = "<@ additionalinput.engine_version | default('11.10') @>"
engine_version = "<@ additionalinput.engine_version | default('11.15') @>"
major_engine_version = "<@ additionalinput.major_engine_version | default('11') @>"
performance_insights_enabled = <@ additionalinput.performance_insights_enabled | default(true) | tojson @>

Expand Down Expand Up @@ -186,7 +186,7 @@ spec:
- AWS_ACCESS_KEY_ID=<@ aws.accessKeyID @>
- AWS_SECRET_ACCESS_KEY=<@ aws.secretAccessKey @>
output:
goTemplate:
goTemplate: |
host: "{{ .instance_ip_addr }}"
port: {{ .port }}
defaultDBName: "{{ .defaultDBName }}"
Expand Down
7 changes: 5 additions & 2 deletions manifests/implementation/aws/redis/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ metadata:
url: https://capact.io
license:
name: "Apache 2.0"
attributes:
cap.attribute.cloud.provider.aws:
revision: 0.1.0

spec:
appVersion: "6.2.x"
Expand Down Expand Up @@ -106,7 +109,7 @@ spec:
- AWS_SECRET_ACCESS_KEY=<@ providercredentials.secretAccessKey @>
- AWS_DEFAULT_REGION=<@ additionalinput.region | default('eu-west-1') @>
output:
goTemplate:
goTemplate: |
elasticache_auth_token: "{{ .elasticache_auth_token }}"
elasticache_parameter_group_id: "{{ .elasticache_parameter_group_id }}"
elasticache_port: "{{ .elasticache_port }}"
Expand Down Expand Up @@ -246,7 +249,7 @@ spec:
raw:
data: |
password: "<@ elasticache_auth_token @>"
port: "<@ elasticache_port @>"
port: <@ elasticache_port @>
host: "<@ elasticache_replication_group_primary_endpoint_address @>"

- name: prepare-parameters
Expand Down
75 changes: 62 additions & 13 deletions manifests/implementation/bitnami/minio/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ spec:
oneOf:
- name: kubernetes
revision: 0.1.0
cap.core.type.hub.storage:
allOf:
- name: cap.type.helm.release.storage
revision: 0.1.0
alias: helm-release-storage
- name: cap.type.helm.template.storage
revision: 0.1.0
alias: helm-template-storage

imports:
- interfaceGroupPath: cap.interface.runner.argo
Expand Down Expand Up @@ -86,7 +94,7 @@ spec:
outputs:
artifacts:
- name: config
from: "{{steps.helm-install.outputs.artifacts.additional}}"
from: "{{steps.resolve-value.outputs.artifacts.ti-artifact}}"
steps:
- - name: prepare-parameters
template: prepare-parameters
Expand Down Expand Up @@ -341,25 +349,29 @@ spec:
resources:
limits: {}
requests: {}

output:
goTemplate: |
<%- set ingressEnabled = additionalinput.apiIngress.enabled | default(false) %>
<%- if ingressEnabled %>
endpoint: https://<@ additionalinput.apiIngress.hostname | default("minio.local") @>
<%- else %>
endpoint: http://{{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.containerPorts.api }}
<%- endif %>
accesskey: {{ .Values.accessKey.password }}
secretkey: {{ .Values.secretKey.password }}
helmRelease:
useHelmReleaseStorage: true
additional:
useHelmTemplateStorage: true
goTemplate: |
<%- set ingressEnabled = additionalinput.apiIngress.enabled | default(false) %>
<%- if ingressEnabled %>
endpoint: https://<@ additionalinput.apiIngress.hostname | default("minio.local") @>
<%- else %>
endpoint: http://{{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.containerPorts.api }}
<%- endif %>
accesskey: {{ .Values.accessKey.password }}
secretkey: {{ .Values.secretKey.password }}

- - name: helm-install
capact-action: helm.install
capact-outputTypeInstances:
- name: helm-release
from: helm-release
- name: config
from: additional
# Affected by https://github.com/capactio/capact/issues/705
backend: helm-release-storage
arguments:
artifacts:
- name: input-parameters
Expand All @@ -373,6 +385,43 @@ spec:
from: "{{inputs.artifacts.kubeconfig}}"
optional: true

# allows reusing this workflow as a part of other umbrella workflows and read the artifact value
- - name: resolve-value
template: resolve-ti-art-value
capact-outputTypeInstances:
- name: config
from: ti-artifact
backend: helm-template-storage
arguments:
artifacts:
- name: ti-artifact
from: "{{steps.helm-install.outputs.artifacts.additional}}"
- name: backend
from: "{{workflow.outputs.artifacts.helm-template-storage}}"

- name: resolve-ti-art-value
inputs:
artifacts:
- name: ti-artifact
path: /tmp/input-ti.yaml
- name: backend
path: /tmp/storage-backend.yaml
outputs:
artifacts:
- name: ti-artifact
path: /tmp/output.yaml
container:
image: ghcr.io/capactio/pr/ti-value-fetcher:PR-707
env:
- name: APP_LOGGER_DEV_MODE
value: "true"
- name: APP_INPUT_TI_FILE_PATH
value: "{{inputs.artifacts.ti-artifact.path}}"
- name: APP_INPUT_BACKEND_TI_FILE_PATH
value: "{{inputs.artifacts.backend.path}}"
- name: APP_OUTPUT_FILE_PATH
value: "{{outputs.artifacts.ti-artifact.path}}"

- name: prepare-parameters
inputs:
artifacts:
Expand Down
78 changes: 64 additions & 14 deletions manifests/implementation/bitnami/mongodb/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ spec:
oneOf:
- name: kubernetes
revision: 0.1.0
cap.core.type.hub.storage:
allOf:
- name: cap.type.helm.release.storage
revision: 0.1.0
alias: helm-release-storage
- name: cap.type.helm.template.storage
revision: 0.1.0
alias: helm-template-storage

imports:
- interfaceGroupPath: cap.interface.runner.helm
Expand Down Expand Up @@ -86,7 +94,7 @@ spec:
outputs:
artifacts:
- name: mongodb
from: "{{steps.helm-install.outputs.artifacts.additional}}"
from: "{{steps.resolve-value.outputs.artifacts.ti-artifact}}"
steps:
- - name: prepare-parameters
template: prepare-parameters
Expand Down Expand Up @@ -360,17 +368,22 @@ spec:
rules: <@ additionalinput.metrics.prometheusRule.rules | default({}) @>

output:
goTemplate: |
replicas:
{{- range $i := until (int .Values.replicaCount) }}
- '{{ include "mongodb.fullname" $ }}-{{ $i }}.{{ include "mongodb.fullname" $ }}-headless.{{ $.Release.Namespace }}.svc:{{ $.Values.service.port }}'
{{- end }}
replicaSetName: '{{ .Values.replicaSetName }}'
defaultDBName: '{{ .Values.auth.database }}'
rootPassword: '{{ .Values.auth.rootPassword }}'
user:
username: '{{ .Values.auth.username }}'
password: '{{ .Values.auth.password }}'
helmRelease:
useHelmReleaseStorage: true
additional:
useHelmTemplateStorage: true
goTemplate: |
replicas:
{{- range $i := until (int .Values.replicaCount) }}
- '{{ include "mongodb.fullname" $ }}-{{ $i }}.{{ include "mongodb.fullname" $ }}-headless.{{ $.Release.Namespace }}.svc:{{ $.Values.service.port }}'
{{- end }}
replicaSetName: '{{ .Values.replicaSetName }}'
defaultDBName: '{{ .Values.auth.database }}'
rootPassword: '{{ .Values.auth.rootPassword }}'
user:
username: '{{ .Values.auth.username }}'
password: '{{ .Values.auth.password }}'

- name: input-parameters
from: "{{steps.prepare-parameters.outputs.artifacts.merged}}"
- name: configuration
Expand All @@ -380,10 +393,10 @@ spec:
- - name: helm-install
capact-action: helm.install
capact-outputTypeInstances: # Defines which artifacts are output TypeInstances
- name: mongodb
from: additional
- name: mongo-helm-release
from: helm-release
# Affected by https://github.com/capactio/capact/issues/705
backend: helm-release-storage
arguments:
artifacts:
- name: input-parameters
Expand All @@ -397,6 +410,43 @@ spec:
from: "{{inputs.artifacts.kubeconfig}}"
optional: true

# allows reusing this workflow as a part of other umbrella workflows and read the artifact value
- - name: resolve-value
template: resolve-ti-art-value
capact-outputTypeInstances:
- name: mongodb
from: ti-artifact
backend: helm-template-storage
arguments:
artifacts:
- name: ti-artifact
from: "{{steps.helm-install.outputs.artifacts.additional}}"
- name: backend
from: "{{workflow.outputs.artifacts.helm-template-storage}}"

- name: resolve-ti-art-value
inputs:
artifacts:
- name: ti-artifact
path: /tmp/input-ti.yaml
- name: backend
path: /tmp/storage-backend.yaml
outputs:
artifacts:
- name: ti-artifact
path: /tmp/output.yaml
container:
image: ghcr.io/capactio/pr/ti-value-fetcher:PR-707
env:
- name: APP_LOGGER_DEV_MODE
value: "true"
- name: APP_INPUT_TI_FILE_PATH
value: "{{inputs.artifacts.ti-artifact.path}}"
- name: APP_INPUT_BACKEND_TI_FILE_PATH
value: "{{inputs.artifacts.backend.path}}"
- name: APP_OUTPUT_FILE_PATH
value: "{{outputs.artifacts.ti-artifact.path}}"

- name: prepare-parameters
inputs:
artifacts:
Expand Down
3 changes: 2 additions & 1 deletion manifests/implementation/bitnami/postgresql/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ spec:
capact-outputTypeInstances:
- name: psql-helm-release
from: helm-release
# Affected by https://github.com/capactio/capact/issues/705
backend: helm-release-storage
arguments:
artifacts:
Expand Down Expand Up @@ -172,7 +173,7 @@ spec:
- name: ti-artifact
path: /tmp/output.yaml
container:
image: ghcr.io/capactio/ti-value-fetcher:2ada6f8
image: ghcr.io/capactio/pr/ti-value-fetcher:PR-707
env:
- name: APP_LOGGER_DEV_MODE
value: "true"
Expand Down
Loading