Skip to content

Commit

Permalink
Define output TI
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed Mar 7, 2022
1 parent 30745e9 commit 373bb74
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 18 deletions.
25 changes: 18 additions & 7 deletions manifests/implementation/aws/secrets-manager/storage/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ metadata:
displayName: "Install"
description: "Installs AWS Secrets Manager storage"
documentationURL: https://capact.io/docs
supportURL: https://aws.amazon.com/secrets-manager/
supportURL: https://aws.amazon.com/secrets-manager
iconURL: https://storage.googleapis.com/dashboard-icons/aws.svg
maintainers:
- email: [email protected]
name: Capact Dev Team
url: https://capact.io
license:
name: "Apache 2.0"
attributes:
cap.attribute.cloud.provider.aws:
revision: 0.1.0

spec:
appVersion: "0.x"
Expand All @@ -27,7 +30,7 @@ spec:
revision: 0.1.0

outputTypeInstanceRelations:
config:
aws-sm-storage:
uses:
- helm-release

Expand Down Expand Up @@ -76,7 +79,9 @@ spec:
- name: additional-parameters
optional: true
outputs:
artifacts: []
artifacts:
- name: aws-sm-storage
from: "{{steps.helm-install.outputs.artifacts.additional}}"
steps:
- - name: prepare-parameters
template: prepare-parameters
Expand All @@ -90,6 +95,7 @@ spec:
from: "{{inputs.artifacts.additional-parameters}}"
optional: true

# TODO: Once Helm storage is implemented (https://github.com/capactio/capact/issues/650), remove usage of output and use TypeInstance projection instead
- - name: create-helm-args
capact-action: jinja2.template
arguments:
Expand Down Expand Up @@ -122,12 +128,12 @@ spec:
targetCPUUtilizationPercentage: <@ additionalinput.autoscaling.targetCPUUtilizationPercentage | default(80) @>
global:
containerRegistry:
overrideTag: <@ additionalinput.global.containerRegistry.overrideTag | default("latest") @>
overrideTag: <@ additionalinput.global.containerRegistry.overrideTag | default("95643d2") @>
path: <@ additionalinput.global.containerRegistry.path | default("ghcr.io/capactio") @>
image:
name: <@ additionalinput.image.name | default("secret-storage-backend") @>
pullPolicy: <@ additionalinput.image.pullPolicy | default("IfNotPresent") @>
imagePullSecrets: <@ additionalinput.imagePullSecrets | default([]]) | tojson @>
imagePullSecrets: <@ additionalinput.imagePullSecrets | default([]) | tojson @>
nodeSelector: <@ additionalinput.nodeSelector | default({}) @>
podAnnotations: <@ additionalinput.podAnnotations | default({}) @>
podSecurityContext: <@ additionalinput.podSecurityContext | default({}) @>
Expand All @@ -147,14 +153,19 @@ spec:
annotations: <@ additionalinput.serviceAccount.annotations | default({}) @>
create: <@ additionalinput.serviceAccount.create | default(true) | tojson @>
name: <@ additionalinput.serviceAccount.name | default("") | tojson @>
tolerations: <@ additionalinput.tolerations | default([]]) | tojson @>
tolerations: <@ additionalinput.tolerations | default([]) | tojson @>
output:
goTemplate: |
url: '{{ include "secret-storage-backend.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}'
contextSchema: null
acceptValue: true
- - name: helm-install
capact-action: helm.install
capact-outputTypeInstances:
- name: helm-release
from: helm-release
- name: config
- name: aws-sm-storage
from: additional
arguments:
artifacts:
Expand Down
8 changes: 4 additions & 4 deletions manifests/interface/aws/secrets-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ kind: InterfaceGroup
metadata:
prefix: "cap.interface.aws"
name: "secrets-manager"
displayName: "secrets-manager"
description: "secrets-manager related Interfaces"
documentationURL: https://aws.amazon.com/secrets-manager/
supportURL: https://aws.amazon.com/secrets-manager/
displayName: "AWS Secrets Manager"
description: "AWS Secrets Manager Interfaces"
documentationURL: https://capact.io/docs
supportURL: https://aws.amazon.com/secrets-manager
iconURL: https://storage.googleapis.com/dashboard-icons/aws.svg
maintainers:
- email: [email protected]
Expand Down
15 changes: 15 additions & 0 deletions manifests/interface/aws/secrets-manager/storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ocfVersion: 0.0.1
revision: 0.1.0
kind: InterfaceGroup
metadata:
prefix: "cap.interface.aws.secrets-manager"
name: "storage"
displayName: "AWS Secrets Manager Storage"
description: "Interfaces for AWS Secrets Manager Storage"
documentationURL: https://capact.io/docs
supportURL: https://aws.amazon.com/secrets-manager
iconURL: https://storage.googleapis.com/dashboard-icons/aws.svg
maintainers:
- email: [email protected]
name: Capact Dev Team
url: https://capact.io
11 changes: 6 additions & 5 deletions manifests/interface/aws/secrets-manager/storage/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
displayName: "Install"
description: "Installs AWS Secrets Manager storage"
documentationURL: https://capact.io/docs
supportURL: https://aws.amazon.com/secrets-manager/
supportURL: https://aws.amazon.com/secrets-manager
iconURL: https://storage.googleapis.com/dashboard-icons/aws.svg
maintainers:
- email: [email protected]
Expand All @@ -24,19 +24,20 @@ spec:
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"required": [ "region" ],
"properties": {
"region": {
"$id": "#/properties/region",
"type": "string",
"description": "AWS region"
"description": "AWS region",
"default": "eu-west-1"
}
}
},
"additionalProperties": false
}
output:
typeInstances:
config:
aws-sm-storage:
typeRef:
path: cap.type.aws.secrets-manager.storage
revision: 0.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
displayName: Additional input
description: Additional input for AWS Secrets Manager storage installation
documentationURL: https://capact.io/docs
supportURL: https://aws.amazon.com/secrets-manager/
supportURL: https://aws.amazon.com/secrets-manager
iconURL: https://storage.googleapis.com/dashboard-icons/aws.svg
maintainers:
- email: [email protected]
Expand Down
8 changes: 7 additions & 1 deletion manifests/type/aws/secrets-manager/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
displayName: AWS Secrets Manager storage
description: AWS Secrets Manager storage backend for Capact Local Hub
documentationURL: https://aws.amazon.com/secrets-manager/
supportURL: https://aws.amazon.com/secrets-manager/
supportURL: https://aws.amazon.com/secrets-manager
iconURL: https://storage.googleapis.com/dashboard-icons/aws.svg
maintainers:
- email: [email protected]
Expand All @@ -21,10 +21,16 @@ spec:
"type": "object",
"title": "The root schema for AWS Secrets Manager Local Hub storage",
"required": [
"url",
"acceptValue",
"contextSchema"
],
"properties": {
"url": {
"$id": "#/properties/url",
"type": "string",
"format": "uri"
},
"contextSchema": {
"$id": "#/properties/contextSchema",
"type": "null",
Expand Down

0 comments on commit 373bb74

Please sign in to comment.