-
Notifications
You must be signed in to change notification settings - Fork 9
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 #9
Merged
mbaldessari
merged 95 commits into
validatedpatterns:main
from
dminnear-rh:common-automatic-update
Feb 27, 2025
Merged
Common automatic update #9
mbaldessari
merged 95 commits into
validatedpatterns:main
from
dminnear-rh:common-automatic-update
Feb 27, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace tabs with spaces and add some missing env vars that could be passed
Since at the time the folder was named operator-install and the chart pattern-install, let's push it out to the `pattern-install-chart` repo which is a bit clearer.
Also push any changes to operator-install to its own repo
Update CRD from operator v0.0.55
Fix chart name in pattern-install branch+split wf
Use $group.name in clusterset metadata
This is needed, this way when this variable is set we can actually detect that an in-cluster gitea instance has been set up.
Release clustergroup v0.8.13
Release acm chart 0.1.2
The "main" subsection of helm values is only used for kickstarting a pattern. It is entirely possible to only set one value and then set the other variables through other means (editing CRs e.g.). There is no point on blocking this.
Drop schema required under the Main section
All the charts that can be used via an OCI registry or via a helm repo are dropped in this change
We do not push any changes from common to the chart because they do not exist in common any longer
It used to contain expected tests for the different charts, but those have moved away, so let's start dropping these for now.
It only makes sense in the presence of helm charts. We should prolly move it to each chart repo.
The current output is a bit daunting for first-time users as it outputs things like the following a few times: customresourcedefinition.apiextensions.k8s.io/patterns.gitops.hybrid-cloud-patterns.io created configmap/patterns-operator-config created subscription.operators.coreos.com/patterns-operator created error: resource mapping not found for name: "rhoai-patterns-demo" namespace: "openshift-operators" from "STDIN": no matches for kind "Pattern" in version "gitops.hybrid-cloud-patterns.io/v1alpha1" ensure CRDs are installed first Let's switch to something a bit more user-friendly: make -f common/Makefile operator-deploy make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops' Checking repository: https://github.com/mbaldessari/multicloud-gitops.git - branch 'luis-demo': OK Checking cluster: cluster-info: OK storageclass: WARNING: No storageclass found Installing pattern: Done ... Do some magic with file descriptors so we still manage to capture the helm template stderr and the oc apply stdout+stderr and output them at the end in case of failure. In such cases the output will be something like the following: Installing pattern: .....Installation failed [5/5]. Error: Pulled: quay.io/hybridcloudpatterns/pattern-install:0.0.3 Digest: sha256:dd2d35d462b75aa8358ff278757dca0ee3c878cadafa64df8c68f880b59569ef E1015 18:41:31.585465 196315 memcache.go:265] couldn't get current server API group list: Get "https://api.sno3.ocplab.ocp:6443/api?timeout=32s": tls: failed to verify certificate: x509: certificate signed by un known authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kube-apiserver-lb-signer") ... Suggested-by: Luis Tomas Bolivar <[email protected]>
Improve validate-origin
Make the make install output less daunting
Otherwise it records the exit code of the exec call which is always 0. This now makes things error out correctly whereas previously it did not: ❯ ./pattern.sh make install make -f common/Makefile operator-deploy make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops' Checking repository: https://github.com/mbaldessari/multicloud-gitops.git - branch 'debug': OK Checking cluster: cluster-info: OK storageclass: OK Installing pattern: .....Installation failed [5/5]. Error: Pulled: quay.io/rhn_support_mbaldess/pattern-install:0.0.4 Digest: sha256:6a5431d257f4bf05d6ac91bca4f4aa010ecb1ee60d2e03c1d0984835d210a0a8 customresourcedefinition.apiextensions.k8s.io/patterns.gitops.hybrid-cloud-patterns.io unchanged configmap/patterns-operator-config unchanged resource mapping not found for name: "patterns-operator" namespace: "openshift-operators" from "STDIN": no matches for kind "SubscriptionNotexistant" in version "operators.coreos.com/v1alpha1" ensure CRDs are installed first Error from server (NotFound): error when creating "STDIN": namespaces "openshift-operators-notexistant" not found make[1]: *** [common/Makefile:71: operator-deploy] Error 1 make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops' make: *** [Makefile:12: operator-deploy] Error 2
Record the exit code at the right time
Fix path when invoking the qe run_test.sh script
Co-Authored-By: Akos Eros <[email protected]>
Since the slimming of common this won't work anymore: ❯ make validate-schema make -f common/Makefile validate-schema make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops' Validating clustergroup schema of: ./values-global.yamlError: repo common not found make[1]: *** [common/Makefile:162: validate-schema] Error 1 make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops' make: *** [Makefile:12: validate-schema] Error 2 Fix this to use the oci helm chart: ❯ make validate-schema make -f common/Makefile validate-schema make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops' Validating clustergroup schema of: ./values-global.yamlPulled: quay.io/hybridcloudpatterns/clustergroup:0.9.13 Digest: sha256:725af54c0a5ad8c2235676bbff2785ece62c9929ab58aaf33837aa3f19708ce6 ./values-group-one.yamlPulled: quay.io/hybridcloudpatterns/clustergroup:0.9.13 Digest: sha256:725af54c0a5ad8c2235676bbff2785ece62c9929ab58aaf33837aa3f19708ce6 ./values-hub.yamlPulled: quay.io/hybridcloudpatterns/clustergroup:0.9.13 Digest: sha256:725af54c0a5ad8c2235676bbff2785ece62c9929ab58aaf33837aa3f19708ce6 make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
Fix validated-schema make target
Yukin observed a case on a baremetal server where the install failed with: make -f common/Makefile operator-deploy make[1]: Entering directory '/home/fedora/validated_patterns/multicloud-gitops' Checking repository: https://github.com/validatedpatterns-workspace/multicloud-gitops - branch 'qe_test-18760': OK Checking cluster: cluster-info: OK storageclass: OK Installing pattern: ....Installation failed [5/5]. Error: WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/fedora/rhvpsno2-intel-18760/auth/kubeconfig WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/fedora/rhvpsno2-intel-18760/auth/kubeconfig Pulled: quay.io/hybridcloudpatterns/pattern-install:0.0.7 Digest: sha256:b845f86c735478cfd44b0b43842697851cec64737c737bd18a872fa86bb0484d customresourcedefinition.apiextensions.k8s.io/patterns.gitops.hybrid-cloud-patterns.io unchanged configmap/patterns-operator-config unchanged pattern.gitops.hybrid-cloud-patterns.io/multicloud-gitops created subscription.operators.coreos.com/patterns-operator unchanged make[1]: *** [common/Makefile:71: operator-deploy] Error 1 make[1]: Leaving directory '/home/fedora/validated_patterns/multicloud-gitops' make: *** [Makefile:12: operator-deploy] Error 2 In fact the install proceeded just okay, we just gave up too early. Let's double the amount of times we wait for this and also increase the wait in between tries by 5 seconds. Hopefully this should cover these edge cases.
Wait some more before giving up
If ACM is installed the search for `applications` matches the ACM one and not the argo one.
Fix argo-healthcheck target
This way we can override the TARGET_SITE when invoking pattern.sh
Add TARGET_SITE as an env variable
Since ubuntu sometimes has /etc/pki/fwupd with little else in there, let's just bind mount /etc/pki when /etc/pki/tls exists. This keeps Fedora-based distros running and should fix this specific corner case observed on ubuntu. Co-Authored-By: Akos Eros <[email protected]> Closes: validatedpatterns/medical-diagnosis#130
Do not bind mount /etc/pki blindly
Add a CI job for pattern.sh
…mands Currently, we pass the env var EXTRA_PLAYBOOK_OPTS into our utility container when running the `pattern-util.sh` script, however, we do not use it anywhere. This commit adds propagation of the env var to the `ansible-playbook` commands which could make use of it. As an example, you could set ```sh export EXTRA_PLAYBOOK_OPTS="-vvv" ``` which would enable verbose logging for any of the ansible playbooks when we run `./pattern.sh make <make_target>` in any of our pattern repos.
propagate the env var EXTRA_PLAYBOOK_OPTS to our ansible-playbook commands
A few small changes in this commit: * Update README to reference the `make-common-subtree` script in common rather than MCG repo * Update README and `make-common-subtree` script to use same default remote name for common subtree that we use in our `update-common-everywhere` script. * Update file name for the script to use dashes rather than underscores for consistency * Update the name of our GH org to `validatedpatterns`
…tree update how to make common subtree
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.