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

common automatic update #37

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1ebca7f
Replace tabs with spaces and add some missing env vars that could be …
mbaldessari Sep 6, 2024
f46898c
Merge pull request #580 from mbaldessari/updates2
mbaldessari Sep 6, 2024
b8e62f2
Also push any changes to operator-install to its own repo
mbaldessari Sep 6, 2024
a64fb4d
Merge pull request #581 from mbaldessari/pattern-install-chart
mbaldessari Sep 6, 2024
907e33b
Update CRD from operator v0.0.55
mbaldessari Sep 6, 2024
b98c8dd
Merge pull request #582 from mbaldessari/crd-update2
mbaldessari Sep 6, 2024
8452d30
Fix chart name in pattern-install branch+split wf
mbaldessari Sep 6, 2024
c2b5bce
Merge pull request #583 from mbaldessari/Fix-workflow
mbaldessari Sep 6, 2024
35576f6
Tweak readme
mbaldessari Sep 6, 2024
cc3d360
Merge pull request #584 from mbaldessari/readme-tweak1
mbaldessari Sep 6, 2024
83976a6
Use $group.name in clusterset metadata
mbaldessari Sep 8, 2024
2154756
Merge pull request #585 from mbaldessari/tiny-cleanup2
mbaldessari Sep 10, 2024
68d731e
Expose originURL as helm value
mbaldessari Sep 11, 2024
2ee7a06
Update tests after common rebase
mbaldessari Sep 11, 2024
d72de95
Merge pull request #586 from mbaldessari/expose-origin
mbaldessari Sep 11, 2024
aaf456b
Release clustergroup v0.8.13
mbaldessari Sep 11, 2024
1c0744d
Merge pull request #587 from mbaldessari/clustergroup-0.8.13
mbaldessari Sep 11, 2024
16c2e4a
Release acm v0.1.2
mbaldessari Sep 11, 2024
31047c2
Merge pull request #588 from mbaldessari/acm-0.1.2
mbaldessari Sep 11, 2024
f608f63
Drop schema required under the Main section
mbaldessari Sep 12, 2024
9a8b7cc
Release clustergroup v0.8.14
mbaldessari Sep 12, 2024
581f32e
Merge pull request #589 from mbaldessari/clustergroup-0.8.14
mbaldessari Sep 12, 2024
47c5923
Update README for the v1 common branch
mbaldessari Sep 13, 2024
4fceb0d
Merge pull request #590 from mbaldessari/v1-update-readme
mbaldessari Sep 13, 2024
08cff4f
Allow customizing the clusterGroupChartVersion
mbaldessari Sep 17, 2024
003e011
Release pattern-install v0.0.2
mbaldessari Sep 17, 2024
3331527
Drop the chart splitting workflows
mbaldessari Sep 17, 2024
06a5879
Merge pull request #598 from mbaldessari/v1-operator-install-clusterg…
mbaldessari Sep 17, 2024
0123cde
Make sure we compare lists with lists when doing a difference
mbaldessari Sep 18, 2024
1cceddf
Merge pull request #599 from mbaldessari/v1-unseal-fix
mbaldessari Sep 18, 2024
2f97619
Merge remote-tracking branch 'common-upstream/v1' into common-automat…
mbaldessari Sep 24, 2024
6ac4820
Update tests after common rebase
mbaldessari Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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