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

Use Helm template storage backend for PostgreSQL and Mattermost installation #66

Merged
merged 5 commits into from
Apr 13, 2022

Conversation

pkosiec
Copy link
Member

@pkosiec pkosiec commented Apr 5, 2022

Description

Changes proposed in this pull request:

  • Use Helm template storage backend for PostgreSQL and Mattermost installation

Notes

I needed to add a new Implementation for Helm Release, which doesn't require Helm Release storage and (in future) will always produce static Helm Release. I couldn't do it right now because of backward compatibility issues. I extended the scope of the capactio/capact#666.

Testing

  1. Run Capact cluster from PR Implement TypeInstance Value Resolver and modify TypeInstance upload capact#697
DISABLE_MONITORING_INSTALLATION=true make dev-cluster
  1. Set manifests from my fork:
kubectl set env deploy/capact-hub-public -n capact-system -c hub-public-populator MANIFESTS_SOURCES="github.com/pkosiec/hub-manifests?ref=dynamic-ti-nested-workflows"
  1. Install Helm Storage Backends via Dashboard
  2. Use ghcr.io/capactio/pr/helm-storage-backend:PR-697 for both Helm template and Helm release container
  3. Update Global Policy:
ACTION_NAME="helm-storage" # your Action name which installed Helm storage backends
HELM_RELEASE_STORAGE_ID=$(capact act get $ACTION_NAME -ojson | jq '.Actions[0].output.typeInstances | map(select(.typeRef.path == "cap.type.helm.release.storage"))[0].id' -r)
HELM_TEMPLATE_STORAGE_ID=$(capact act get $ACTION_NAME -ojson | jq '.Actions[0].output.typeInstances | map(select(.typeRef.path == "cap.type.helm.template.storage"))[0].id' -r)

capact ti get $HELM_RELEASE_STORAGE_ID -oyaml
capact ti get $HELM_TEMPLATE_STORAGE_ID -oyaml

cat > /tmp/helm-storage-policy.yaml << ENDOFFILE
interface:
  default: # properties applied to all rules above
     inject:
       requiredTypeInstances:
          - id: ${HELM_TEMPLATE_STORAGE_ID}
            description: "Helm template"
          - id: ${HELM_RELEASE_STORAGE_ID}
            description: "Helm release"
  rules:
      - interface:
          path: cap.*
        oneOf:
        - implementationConstraints:
            requires:
            - path: cap.core.type.platform.kubernetes
        - implementationConstraints: {}
ENDOFFILE
capact policy apply -f /tmp/helm-storage-policy.yaml
  1. Run Mattermost installation

Related issue(s)

capactio/capact#695

@pkosiec pkosiec added WIP Work in progress enhancement New feature or request area/hub-manifests Relates to Hub manifests labels Apr 5, 2022
@pkosiec pkosiec force-pushed the dynamic-ti-nested-workflows branch 2 times, most recently from c8fd995 to 44c7c1a Compare April 8, 2022 14:59
@pkosiec pkosiec force-pushed the dynamic-ti-nested-workflows branch from 44c7c1a to a50c91d Compare April 8, 2022 15:06
Copy link
Contributor

@mkuziemko mkuziemko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@pkosiec pkosiec force-pushed the dynamic-ti-nested-workflows branch from cf1121e to e1d3c38 Compare April 13, 2022 07:47
@pkosiec pkosiec merged commit fd4d2c9 into capactio:main Apr 13, 2022
@pkosiec pkosiec deleted the dynamic-ti-nested-workflows branch April 13, 2022 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hub-manifests Relates to Hub manifests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants