Skip to content

Conversation

@JakobGray
Copy link
Contributor

@JakobGray JakobGray commented Dec 18, 2024

Version flag expects a string representing an Openshift minor release in the form 'X.Y'. On create this sets the wif template used by the wif config. On upgrade, the version is added to the list of templates.

Given a version like 4.17, the CLI will parse that it is in X.Y form and convert it to the expected wif template id form v4.17. Otherwise it will pass the input directly for the backend to validate.

Example use:

➜  ocm-cli git:(OCM-12391) ✗ go run ./cmd/ocm gcp create wif-config --name=jdg3 --project=sda-ccs-1 --version=4.17 --mode=manual

The flag can also be set during interactive create mode:

➜  ocm-cli git:(OCM-12391) ✗ go run ./cmd/ocm gcp create wif-config --mode=manual -i
? wif-config name: name
? Gcp Project ID: sda-ccs-1
? The OCP version to configure the wif-config for. Will default to the latest supported version if left unset.
? Openshift version: 

Manual Mode
Script generated by manually running an update with two versions: apply.txt
This doubles the number of roles to create and update

Tests run

  • Returning 400 when giving an invalid version input
  • Update adds new roles for version, and old roles from existing version if missing
  • Update generates script covering both versions assigned
  • Verify command passes following an update

Issues:
OCM-12391
OCM-12396

Copy link
Collaborator

@rcampos2029 rcampos2029 left a comment

Choose a reason for hiding this comment

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

There is a constant name that should be fixed. We must communicate to the user that leaving the version option empty during wif-config creation will result in a wif-config that uses the latest version.

Version will set the wif_templates field of the wif-config.
Copy link
Collaborator

@rcampos2029 rcampos2029 left a comment

Choose a reason for hiding this comment

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

Tested in local environment. LGTM

@rcampos2029 rcampos2029 merged commit d4deb29 into openshift-online:main Jan 2, 2025
4 of 5 checks passed
@JakobGray JakobGray deleted the OCM-12391 branch January 6, 2025 16:09
ckandag added a commit that referenced this pull request Feb 27, 2025
-3a8ef75 OCM-12971 | 'ocm gcp update wif-config' remediates all wif-config misconfigurations (#696)
-d4deb29 Add 'version' flag to wif-config create and update commands (#698)
-f079176 updated help message for wif verification errors
-1fb1d56 Refactored GCP client operations to log user messages and optimized resource updation (#700)
-dd04c33 Update Konflux references (#697)
-c84225e OCM-11995 | feat : Add GCP KMS custom encryption support (#701)
-7ac7051 added 'availability-zone' argument to machine pool creation (#703)
-56ca538 updates to konflux_build_pipeline (#704)
-b37893c listing wif-configs shows supported versions (#706)
-7087572 Update Konflux references (#702)
-7aac46f Update Konflux references (#707)
-2045f98 Update github.com/pkg/browser digest to 5ac0b6a (#708)
-0b6615a Update module github.com/golang-jwt/jwt/v4 to v4.5.1 (#709)
-1cf3d22 Update module github.com/openshift-online/ocm-sdk-go to v0.1.459 (#711)
-579f8de Update module github.com/golang/glog to v1.2.4 (#710)
-c5c95d5 n-3 vesion supportfor  wif-update (#713)
ckandag added a commit that referenced this pull request Feb 27, 2025
-3a8ef75 OCM-12971 | 'ocm gcp update wif-config' remediates all wif-config misconfigurations (#696)
-d4deb29 Add 'version' flag to wif-config create and update commands (#698)
-f079176 updated help message for wif verification errors
-1fb1d56 Refactored GCP client operations to log user messages and optimized resource updation (#700)
-dd04c33 Update Konflux references (#697)
-c84225e OCM-11995 | feat : Add GCP KMS custom encryption support (#701)
-7ac7051 added 'availability-zone' argument to machine pool creation (#703)
-56ca538 updates to konflux_build_pipeline (#704)
-b37893c listing wif-configs shows supported versions (#706)
-7087572 Update Konflux references (#702)
-7aac46f Update Konflux references (#707)
-2045f98 Update github.com/pkg/browser digest to 5ac0b6a (#708)
-0b6615a Update module github.com/golang-jwt/jwt/v4 to v4.5.1 (#709)
-1cf3d22 Update module github.com/openshift-online/ocm-sdk-go to v0.1.459 (#711)
-579f8de Update module github.com/golang/glog to v1.2.4 (#710)
-c5c95d5 n-3 vesion supportfor  wif-update (#713)
@ckandag ckandag mentioned this pull request Feb 27, 2025
rcampos2029 pushed a commit that referenced this pull request Feb 27, 2025
-3a8ef75 OCM-12971 | 'ocm gcp update wif-config' remediates all wif-config misconfigurations (#696)
-d4deb29 Add 'version' flag to wif-config create and update commands (#698)
-f079176 updated help message for wif verification errors
-1fb1d56 Refactored GCP client operations to log user messages and optimized resource updation (#700)
-dd04c33 Update Konflux references (#697)
-c84225e OCM-11995 | feat : Add GCP KMS custom encryption support (#701)
-7ac7051 added 'availability-zone' argument to machine pool creation (#703)
-56ca538 updates to konflux_build_pipeline (#704)
-b37893c listing wif-configs shows supported versions (#706)
-7087572 Update Konflux references (#702)
-7aac46f Update Konflux references (#707)
-2045f98 Update github.com/pkg/browser digest to 5ac0b6a (#708)
-0b6615a Update module github.com/golang-jwt/jwt/v4 to v4.5.1 (#709)
-1cf3d22 Update module github.com/openshift-online/ocm-sdk-go to v0.1.459 (#711)
-579f8de Update module github.com/golang/glog to v1.2.4 (#710)
-c5c95d5 n-3 vesion supportfor  wif-update (#713)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants