Skip to content

Commit

Permalink
Merge remote-tracking branch 'common-upstream/v1' into common-automat…
Browse files Browse the repository at this point in the history
…ic-update
  • Loading branch information
mbaldessari committed Sep 24, 2024
2 parents 94b7177 + 1cceddf commit 2f97619
Show file tree
Hide file tree
Showing 24 changed files with 145 additions and 188 deletions.
108 changes: 0 additions & 108 deletions common/.github/workflows/chart-branches.yml

This file was deleted.

42 changes: 0 additions & 42 deletions common/.github/workflows/chart-split.yml

This file was deleted.

5 changes: 5 additions & 0 deletions common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Note

This is the `v1` branch of common and it contains all the VP helm charts. Please use this branch if your pattern
has not migrated to the multisource approach.

## Start Here

This repository is never used as standalone. It is usually imported in each pattern as a subtree.
Expand Down
2 changes: 1 addition & 1 deletion common/acm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description: A Helm chart to configure Advanced Cluster Manager for OpenShift.
keywords:
- pattern
name: acm
version: 0.1.1
version: 0.1.2
2 changes: 2 additions & 0 deletions common/acm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Default always defined valueFiles to be included when pushing the cluster wide a
{{- define "acm.app.policies.helmparameters" -}}
- name: global.repoURL
value: {{ $.Values.global.repoURL }}
- name: global.originURL
value: {{ $.Values.global.originURL }}
- name: global.targetRevision
value: {{ $.Values.global.targetRevision }}
- name: global.namespace
Expand Down
2 changes: 1 addition & 1 deletion common/acm/templates/provision/clusterpool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ metadata:
cloud: {{ $cloud }}
region: '{{ $region }}'
vendor: OpenShift
cluster.open-cluster-management.io/clusterset: {{ .name }}
cluster.open-cluster-management.io/clusterset: {{ $group.name }}
spec:
{{- if .size }}
size: {{ .size }}
Expand Down
2 changes: 1 addition & 1 deletion common/ansible/roles/vault_utils/tasks/vault_status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@

- name: "Followers"
ansible.builtin.set_fact:
followers: "{{ vault_pods | difference(vault_pod) }}"
followers: "{{ vault_pods | difference([vault_pod]) }}"
2 changes: 1 addition & 1 deletion common/clustergroup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description: A Helm chart to create per-clustergroup ArgoCD applications and any
keywords:
- pattern
name: clustergroup
version: 0.8.12
version: 0.8.14
2 changes: 2 additions & 0 deletions common/clustergroup/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Default always defined top-level variables for helm charts
{{- define "clustergroup.app.globalvalues.helmparameters" -}}
- name: global.repoURL
value: {{ $.Values.global.repoURL }}
- name: global.originURL
value: {{ $.Values.global.originURL }}
- name: global.targetRevision
value: {{ $.Values.global.targetRevision }}
- name: global.namespace
Expand Down
4 changes: 0 additions & 4 deletions common/clustergroup/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@
"git": {
"type": "object",
"additionalProperties": false,
"required": [
"repoURL",
"revision"
],
"properties": {
"repoUpstreamURL": {
"type": "string",
Expand Down
30 changes: 30 additions & 0 deletions common/operator-install/.github/workflows/update-helm-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This invokes the workflow named 'publish-charts' in the umbrella repo
# It expects to have a secret called CHARTS_REPOS_TOKEN which contains
# the GitHub token that has permissions to invoke workflows and commit code
# inside the umbrella-repo.
# The following fine-grained permissions were used in testing and were limited
# to the umbrella repo only:
# - Actions: r/w
# - Commit statuses: r/w
# - Contents: r/w
# - Deployments: r/w
# - Pages: r/w
#

name: vp-patterns/update-helm-repo
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
helmlint:
uses: validatedpatterns/helm-charts/.github/workflows/helmlint.yml@985ba37e0eb50b1b35ec194fc999eae2d0ae1486
permissions:
contents: read

update-helm-repo:
needs: [helmlint]
uses: validatedpatterns/helm-charts/.github/workflows/update-helm-repo.yml@985ba37e0eb50b1b35ec194fc999eae2d0ae1486
permissions: read-all
secrets: inherit
2 changes: 1 addition & 1 deletion common/operator-install/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description: A Helm chart to build and deploy a Cloud Pattern via the patterns o
keywords:
- pattern
name: pattern-install
version: 0.0.1
version: 0.0.2
8 changes: 6 additions & 2 deletions common/operator-install/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Update CRD

In order to update the CRD, copy the following file from the last released patterns operator version:
`cp -v patterns-operator/config/crd/bases/gitops.hybrid-cloud-patterns.io_patterns.yaml ./crds/`
In order to update the CRD, copy the following file from the last released
patterns operator version:

```sh
cp -v patterns-operator/config/crd/bases/gitops.hybrid-cloud-patterns.io_patterns.yaml ./crds/
```
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,19 @@ spec:
description: Optional. FQDN of the git server if automatic parsing
from TargetRepo is broken
type: string
inClusterGitServer:
default: false
description: (EXPERIMENTAL) Enable in-cluster git server (avoids
the need of forking the upstream repository)
type: boolean
originRepo:
description: Upstream git repo containing the pattern to deploy.
Used when in-cluster fork to point to the upstream pattern repository
description: |-
Upstream git repo containing the pattern to deploy. Used when in-cluster fork to point to the upstream pattern repository.
Takes precedence over TargetRepo
type: string
originRevision:
description: Branch, tag or commit in the upstream git repository.
Does not support short-sha's. Default to HEAD
description: (DEPRECATED) Branch, tag or commit in the upstream
git repository. Does not support short-sha's. Default to HEAD
type: string
pollInterval:
default: 180
Expand All @@ -124,8 +130,6 @@ spec:
description: Optional. K8s secret namespace where the token for
connecting to git can be found
type: string
required:
- targetRepo
type: object
multiSourceConfig:
properties:
Expand Down
3 changes: 3 additions & 0 deletions common/operator-install/templates/pattern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
{{- if .Values.main.multiSourceConfig.helmRepoUrl }}
helmRepoUrl: {{ .Values.main.multiSourceConfig.helmRepoUrl }}
{{- end }} {{/* if .Values.main.multiSourceConfig.helmRepoUrl */}}
{{- if .Values.main.multiSourceConfig.clusterGroupChartVersion }}
clusterGroupChartVersion: {{ .Values.main.multiSourceConfig.clusterGroupChartVersion }}
{{- end }} {{/* if .Values.main.multiSourceConfig.clusterGroupChartVersion */}}
{{- if .Values.main.analyticsUUID }}
analyticsUUID: {{ .Values.main.analyticsUUID }}
{{- end }} {{/* if .Values.main.analyticsUUID */}}
Expand Down
1 change: 1 addition & 0 deletions common/operator-install/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ main:
multiSourceConfig:
enabled: false
# helmRepoUrl: registry.internal.network/helm
# clusterGroupChartVersion: 0.8.*

# String to enable certain experimental capabilities in the operator and the
# framework. Not needed unless you know exactly what you're doing.
Expand Down
42 changes: 23 additions & 19 deletions common/scripts/pattern-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,26 @@ fi
# $HOME is mounted to /root because the UID in the container is 0 and that's where SSH looks for credentials

podman run -it --rm --pull=newer \
--security-opt label=disable \
-e EXTRA_HELM_OPTS \
-e EXTRA_PLAYBOOK_OPTS \
-e VALUES_SECRET \
-e KUBECONFIG \
-e K8S_AUTH_HOST \
-e K8S_AUTH_VERIFY_SSL \
-e K8S_AUTH_SSL_CA_CERT \
-e K8S_AUTH_USERNAME \
-e K8S_AUTH_PASSWORD \
-e K8S_AUTH_TOKEN \
${PKI_HOST_MOUNT_ARGS} \
-v "${HOME}":"${HOME}" \
-v "${HOME}":/pattern-home \
${PODMAN_ARGS} \
${EXTRA_ARGS} \
-w "$(pwd)" \
"$PATTERN_UTILITY_CONTAINER" \
$@
--security-opt label=disable \
-e EXTRA_HELM_OPTS \
-e EXTRA_PLAYBOOK_OPTS \
-e TARGET_ORIGIN \
-e NAME \
-e TOKEN_SECRET \
-e TOKEN_NAMESPACE \
-e VALUES_SECRET \
-e KUBECONFIG \
-e K8S_AUTH_HOST \
-e K8S_AUTH_VERIFY_SSL \
-e K8S_AUTH_SSL_CA_CERT \
-e K8S_AUTH_USERNAME \
-e K8S_AUTH_PASSWORD \
-e K8S_AUTH_TOKEN \
${PKI_HOST_MOUNT_ARGS} \
-v "${HOME}":"${HOME}" \
-v "${HOME}":/pattern-home \
${PODMAN_ARGS} \
${EXTRA_ARGS} \
-w "$(pwd)" \
"$PATTERN_UTILITY_CONTAINER" \
$@
2 changes: 2 additions & 0 deletions common/tests/acm-industrial-edge-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ spec:
parameters:
- name: global.repoURL
value: https://github.com/pattern-clone/mypattern
- name: global.originURL
value:
- name: global.targetRevision
value: main
- name: global.namespace
Expand Down
2 changes: 2 additions & 0 deletions common/tests/acm-medical-diagnosis-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ spec:
parameters:
- name: global.repoURL
value: https://github.com/pattern-clone/mypattern
- name: global.originURL
value:
- name: global.targetRevision
value: main
- name: global.namespace
Expand Down
Loading

0 comments on commit 2f97619

Please sign in to comment.