Skip to content

Commit

Permalink
Merge pull request #33 from mbaldessari/common-automatic-update
Browse files Browse the repository at this point in the history
common automatic update
  • Loading branch information
mbaldessari committed Aug 27, 2024
2 parents f25f06b + fc06e45 commit 0769976
Show file tree
Hide file tree
Showing 53 changed files with 2,209 additions and 501 deletions.
5 changes: 4 additions & 1 deletion common/.github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter/slim@v6
uses: super-linter/super-linter/slim@v7
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: main
Expand All @@ -31,10 +31,13 @@ jobs:
VALIDATE_BASH: false
VALIDATE_CHECKOV: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_KUBERNETES_KUBECONFORM: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_SHELL_SHFMT: false
VALIDATE_YAML: false
VALIDATE_YAML_PRETTIER: false
# VALIDATE_DOCKERFILE_HADOLINT: false
# VALIDATE_MARKDOWN: false
# VALIDATE_NATURAL_LANGUAGE: false
Expand Down
2 changes: 1 addition & 1 deletion common/Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
## October 3, 2022

* Restore the ability to install a non-default site: `make TARGET_SITE=mysite install`
* Revised tests (new output and filenames, requires adding new result files to git)
* Revised tests (new output and filenames, requires adding new result files to Git)
* ACM 2.6 required for ACM-based managed sites
* Introduced global.clusterDomain template variable (without the `apps.` prefix)
* Removed the ability to send specific charts to another cluster, use hosted argo sites instead
Expand Down
5 changes: 4 additions & 1 deletion common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,18 @@ super-linter: ## Runs super linter locally
-e VALIDATE_CHECKOV=false \
-e VALIDATE_DOCKERFILE_HADOLINT=false \
-e VALIDATE_JSCPD=false \
-e VALIDATE_JSON_PRETTIER=false \
-e VALIDATE_MARKDOWN_PRETTIER=false \
-e VALIDATE_KUBERNETES_KUBECONFORM=false \
-e VALIDATE_PYTHON_PYLINT=false \
-e VALIDATE_SHELL_SHFMT=false \
-e VALIDATE_TEKTON=false \
-e VALIDATE_YAML=false \
-e VALIDATE_YAML_PRETTIER=false \
$(DISABLE_LINTERS) \
-v $(PWD):/tmp/lint:rw,z \
-w /tmp/lint \
ghcr.io/super-linter/super-linter:slim-v6
ghcr.io/super-linter/super-linter:slim-v7

.PHONY: ansible-lint
ansible-lint: ## run ansible lint on ansible/ folder
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.0
version: 0.1.1
2 changes: 1 addition & 1 deletion common/acm/templates/policies/ocp-gitops-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
channel: {{ default "gitops-1.12" .Values.main.gitops.channel }}
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
source: {{ default "redhat-operators" .Values.main.gitops.operatorSource }}
sourceNamespace: openshift-marketplace
config:
env:
Expand Down
2 changes: 1 addition & 1 deletion common/ansible/roles/iib_ci/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IIB Utilities

A set of ansible plays to fetch an IIB (Image Index Bundle, aka a container created by the operator sdk
A set of ansible plays to fetch an IIB (Image Index Bundle, aka a container created by the operator SDK
that contains a bunch of references to operators that can be installed in an OpenShift cluster)

Run `ansible-playbook common/ansible/playbooks/iib-ci/lookup.yml` to see which IIBs are available (defaults to
Expand Down
2 changes: 1 addition & 1 deletion common/ansible/roles/vault_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ By default, the first file that will looked up is
The paths can be overridden by setting the environment variable `VALUES_SECRET` to the path of the
secret file.

The values secret yaml files can be encrypted with `ansible-vault`. If the role detects they are encrypted, the password to
The values secret YAML files can be encrypted with `ansible-vault`. If the role detects they are encrypted, the password to
decrypt them will be prompted when needed.

### Version 1.0
Expand Down
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.10
version: 0.8.12
32 changes: 29 additions & 3 deletions common/clustergroup/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
"revision"
],
"properties": {
"repoUpstreamURL": {
"type": "string",
"description": "Upstream URL of the pattern's git repository. When set an in-cluster gitea instance gets spawned and repoURL is ignored"
},
"repoURL": {
"type": "string",
"description": "URL of the pattern's git repository"
Expand All @@ -93,21 +97,43 @@
},
"gitops": {
"type": "object",
"additionalProperties": false,
"additionalProperties": true,
"properties": {
"channel": {
"type": "string",
"description": "The channel from which to install the gitops operator"
},
"operatorSource": {
"type": "string",
"description": "The catalog source from which to install the gitops operator"
}
}
},
"patternsOperator": {
"type": "object",
"additionalProperties": true,
"properties": {
"channel": {
"type": "string",
"description": "The channel from which to install the patterns operator"
},
"source": {
"type": "string",
"description": "The catalog source from which to install the patterns operator"
}
}
},
"multiSourceConfig": {
"type": "object",
"additionalProperties": false,
"additionalProperties": true,
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable the experimental support for multi source"
"description": "Enable the experimental support for multi source for the clustergroup chart"
},
"helmRepoUrl": {
"type": "string",
"description": "The helm repo URL for the clustergroup chart"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions common/golang-external-secrets/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ description: A Helm chart to configure the golang-based external-secrets.
keywords:
- pattern
name: golang-external-secrets
version: 0.1.1
version: 0.1.2
dependencies:
- name: external-secrets
version: "0.9.20"
version: "0.10.0"
repository: "https://charts.external-secrets.io"
#"https://external-secrets.github.io/kubernetes-external-secrets"
2 changes: 1 addition & 1 deletion common/golang-external-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ we just override the tag with the version + "-ubi"
3. Run `./update-helm-dependency.sh`
4. Tweak `values.yaml` with the new image versions
5. Run `make test`
6. Commit to git
6. Commit to Git

## PRs

Expand Down
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions common/golang-external-secrets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ clusterGroup:

external-secrets:
image:
tag: v0.9.20-ubi
tag: v0.10.0-ubi
webhook:
image:
tag: v0.9.20-ubi
tag: v0.10.0-ubi
certController:
image:
tag: v0.9.20-ubi
tag: v0.10.0-ubi
2 changes: 1 addition & 1 deletion common/hashicorp-vault/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A Helm chart to configure Hashicorp's vault.
keywords:
- pattern
name: hashicorp-vault
version: 0.1.1
version: 0.1.2
dependencies:
- name: vault
version: "0.28.1"
Expand Down
2 changes: 1 addition & 1 deletion common/hashicorp-vault/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ vault:
termination: "reencrypt"
image:
repository: "registry.connect.redhat.com/hashicorp/vault"
tag: "1.17.2-ubi"
tag: "1.17.3-ubi"
2 changes: 1 addition & 1 deletion common/letsencrypt/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 6 additions & 0 deletions common/operator-install/templates/pattern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
spec:
clusterGroupName: {{ .Values.main.clusterGroupName }}
gitSpec:
{{- if .Values.main.git.repoUpstreamURL }}
originRepo: {{ .Values.main.git.repoUpstreamURL }}
{{- end }} {{/* if .Values.main.git.repoUpstreamURL */}}
targetRepo: {{ .Values.main.git.repoURL }}
targetRevision: {{ .Values.main.git.revision }}
{{- if and .Values.main.tokenSecret .Values.main.tokenSecretNamespace }}
Expand All @@ -14,6 +17,9 @@ spec:
{{- end }} {{/* if and .Values.main.tokenSecret .Values.main.tokenSecretNamespace */}}
multiSourceConfig:
enabled: {{ .Values.main.multiSourceConfig.enabled }}
{{- if .Values.main.multiSourceConfig.helmRepoUrl }}
helmRepoUrl: {{ .Values.main.multiSourceConfig.helmRepoUrl }}
{{- end }} {{/* if .Values.main.multiSourceConfig.helmRepoUrl */}}
{{- if .Values.main.analyticsUUID }}
analyticsUUID: {{ .Values.main.analyticsUUID }}
{{- end }} {{/* if .Values.main.analyticsUUID */}}
Expand Down
6 changes: 6 additions & 0 deletions common/operator-install/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ global:

main:
git:
# Uncommenting this will set the `originRepo` with the below value
# when `originRepo` is set, an in-cluster gitea will automatically be spawned.
# In this case `originRepo` will point to the upstream repository and `targetRepo`
# will point to the internal in-cluster gitea mirror
# repoUpstreamURL: https://github.com/validatedpatterns/multicloud-gitops
repoURL: https://github.com/pattern-clone/mypattern
revision: main

Expand All @@ -12,6 +17,7 @@ main:

multiSourceConfig:
enabled: false
# helmRepoUrl: registry.internal.network/helm

# String to enable certain experimental capabilities in the operator and the
# framework. Not needed unless you know exactly what you're doing.
Expand Down
10 changes: 9 additions & 1 deletion common/scripts/pattern-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ else
MYNAME=$(id -n -u)
MYUID=$(id -u)
MYGID=$(id -g)
PODMAN_ARGS="--passwd-entry ${MYNAME}:x:${MYUID}:${MYGID}:/pattern-home:/bin/bash --user ${MYUID}:${MYGID} --userns keep-id:uid=${MYUID},gid=${MYGID}"
PODMAN_ARGS="--passwd-entry ${MYNAME}:x:${MYUID}:${MYGID}::/pattern-home:/bin/bash --user ${MYUID}:${MYGID} --userns keep-id:uid=${MYUID},gid=${MYGID}"

fi

if [ -n "$KUBECONFIG" ]; then
Expand Down Expand Up @@ -73,7 +74,14 @@ 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 \
Expand Down
Loading

0 comments on commit 0769976

Please sign in to comment.