-
Notifications
You must be signed in to change notification settings - Fork 15
ROSAENG-65393: feat: migrate rosactl to use clientset sdk #113
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
Open
cdoan1
wants to merge
4
commits into
openshift-online:main
Choose a base branch
from
cdoan1:ROSAENG-65393-use-clientset-sdk
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1734a5e
refactor: migrate all cluster and nodepool operations to platform-api…
cdoan1 feedbe7
fix(cluster): use Kubernetes-style payload structure for cluster crea…
cdoan1 b755597
fix(ci): enable Go toolchain auto-download to match go.mod 1.26.3
cdoan1 3dc1413
fix(nodepool): use Kubernetes-style payload structure for nodepool cr…
cdoan1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,6 @@ | ||
| # CI build-root image for rosa-regional-platform-cli PR checks. | ||
| # Used by ci-operator via build_root.project_image.dockerfile_path. | ||
| FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.26-openshift-4.23 | ||
|
|
||
| FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.25-openshift-4.22 | ||
|
|
||
| ARG GOLANGCI_LINT_VERSION=v1.62.2 | ||
|
|
||
| # Install golangci-lint using go install to ensure it's built with Go 1.25 | ||
| # This avoids "Go language version used to build golangci-lint is lower than targeted version" errors | ||
| # golangci-lint install must not use vendor-only mode from the base image; allow | ||
| # resolving modules for this one command only (not as a global default for CI). | ||
| RUN GOFLAGS=-mod=mod go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} && \ | ||
| golangci-lint --version | ||
|
|
||
| # Pre-create cache directories writable by any UID (OpenShift runs as random UID) | ||
| RUN mkdir -p /tmp/.golangci-lint-cache /tmp/.gocache /tmp/.gomodcache && \ | ||
| chmod -R 777 /tmp/.golangci-lint-cache /tmp/.gocache /tmp/.gomodcache | ||
|
|
||
| # Default for repo checks: refuse silent go.mod/go.sum updates. Use GOFLAGS=-mod=mod | ||
| # only on commands that intentionally modify modules (e.g. go mod tidy). | ||
| ENV GOFLAGS="-mod=readonly" | ||
| ENV GOLANGCI_LINT_CACHE=/tmp/.golangci-lint-cache | ||
| ENV GOCACHE=/tmp/.gocache | ||
| ENV GOMODCACHE=/tmp/.gomodcache | ||
| # Allow Go toolchain auto-download for go.mod version requirements (1.26.3) | ||
| ENV GOTOOLCHAIN=auto |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| rosactl cluster kubeconfig 8372824b-1131-4c26-91fc-9736694dcd19 | ||
| ```bash | ||
| apiVersion: v1 | ||
| kind: Config | ||
| clusters: | ||
| - cluster: | ||
| server: https://api.cdoan-hcp100.8372.0.us-east-1-eph-4b8b842d.dev0.rosa.devshift.net:443 | ||
| name: cdoan-hcp100 | ||
| users: | ||
| - name: cdoan-hcp100-iam | ||
| user: | ||
| exec: | ||
| apiVersion: client.authentication.k8s.io/v1 | ||
| interactiveMode: Never | ||
| command: /Users/cdoan/.local/bin/rosactl | ||
| args: | ||
| - cluster | ||
| - get-token | ||
| - --cluster-id | ||
| - 8372824b-1131-4c26-91fc-9736694dcd19 | ||
| - --region | ||
| - us-east-1 | ||
| contexts: | ||
| - context: | ||
| cluster: cdoan-hcp100 | ||
| user: cdoan-hcp100-iam | ||
| name: cdoan-hcp100 | ||
| current-context: cdoan-hcp100 | ||
| ``` | ||
|
|
||
| # set the kubeconfig | ||
| export KUBECONFIG=/tmp/cdoan-hcp100.kube | ||
|
|
||
| # switch to the aws account | ||
| export AWS_PROFILE=rrp-chris-regional_cluster | ||
|
|
||
| # verify we can create pods | ||
| kubectl create deployment demo-nginx --image=nginx --replicas=3 |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,56 +1,92 @@ | ||
| module github.com/openshift-online/rosa-regional-platform-cli | ||
|
|
||
| go 1.25.8 | ||
| go 1.26.3 | ||
|
|
||
| require ( | ||
| github.com/aws/aws-lambda-go v1.54.0 | ||
| github.com/aws/aws-sdk-go-v2 v1.43.0 | ||
| github.com/aws/aws-sdk-go-v2 v1.43.5 | ||
| github.com/aws/aws-sdk-go-v2/config v1.32.22 | ||
| github.com/aws/aws-sdk-go-v2/credentials v1.19.21 | ||
| github.com/aws/aws-sdk-go-v2/credentials v1.19.30 | ||
| github.com/aws/aws-sdk-go-v2/service/cloudformation v1.71.15 | ||
| github.com/aws/aws-sdk-go-v2/service/ec2 v1.308.0 | ||
| github.com/aws/aws-sdk-go-v2/service/ecr v1.58.2 | ||
| github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.36.0 | ||
| github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.58.1 | ||
| github.com/aws/aws-sdk-go-v2/service/iam v1.54.2 | ||
| github.com/aws/aws-sdk-go-v2/service/lambda v1.92.1 | ||
| github.com/aws/aws-sdk-go-v2/service/route53 v1.65.2 | ||
| github.com/aws/aws-sdk-go-v2/service/sts v1.43.1 | ||
| github.com/aws/smithy-go v1.27.3 | ||
| github.com/aws/aws-sdk-go-v2/service/sts v1.45.0 | ||
| github.com/aws/smithy-go v1.27.7 | ||
| github.com/onsi/ginkgo/v2 v2.29.0 | ||
| github.com/onsi/gomega v1.42.1 | ||
| github.com/openshift-online/rosa-hyperfleet-api/api v0.0.0 | ||
| github.com/openshift-online/rosa-hyperfleet-api/clientset v0.0.0-00010101000000-000000000000 | ||
| github.com/openshift/hypershift/api v0.0.0-20260625052409-9acec4759a16 | ||
| github.com/spf13/cobra v1.10.2 | ||
| k8s.io/apimachinery v0.36.0 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/Masterminds/semver/v3 v3.4.0 // indirect | ||
| github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.12 // indirect | ||
| github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.27 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.31 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.31 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.28 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.36.0 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.58.1 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/signin v1.1.3 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/sso v1.31.1 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.4 // indirect | ||
| github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.31 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.36 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.36 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.32 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.31 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/signin v1.5.0 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/sso v1.33.0 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.0 // indirect | ||
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
| github.com/go-logr/logr v1.4.3 // indirect | ||
| github.com/emicklei/go-restful/v3 v3.13.0 // indirect | ||
| github.com/fxamacker/cbor/v2 v2.9.2 // indirect | ||
| github.com/go-logr/logr v1.4.4 // indirect | ||
| github.com/go-openapi/jsonpointer v0.21.0 // indirect | ||
| github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
| github.com/go-openapi/swag v0.23.0 // indirect | ||
| github.com/go-task/slim-sprig/v3 v3.0.0 // indirect | ||
| github.com/google/gnostic-models v0.7.0 // indirect | ||
| github.com/google/go-cmp v0.7.0 // indirect | ||
| github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 // indirect | ||
| github.com/google/uuid v1.6.0 // indirect | ||
| github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect | ||
| github.com/rogpeppe/go-internal v1.14.1 // indirect | ||
| github.com/josharian/intern v1.0.0 // indirect | ||
| github.com/json-iterator/go v1.1.12 // indirect | ||
| github.com/mailru/easyjson v0.7.7 // indirect | ||
| github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
| github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect | ||
| github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
| github.com/openshift/api v0.0.0-20260416105050-3c6b218b8a80 // indirect | ||
| github.com/spf13/pflag v1.0.10 // indirect | ||
| github.com/stretchr/testify v1.11.1 // indirect | ||
| github.com/x448/float16 v0.8.4 // indirect | ||
| go.yaml.in/yaml/v2 v2.4.4 // indirect | ||
| go.yaml.in/yaml/v3 v3.0.4 // indirect | ||
| golang.org/x/mod v0.36.0 // indirect | ||
| golang.org/x/net v0.56.0 // indirect | ||
| golang.org/x/oauth2 v0.34.0 // indirect | ||
| golang.org/x/sync v0.21.0 // indirect | ||
| golang.org/x/sys v0.46.0 // indirect | ||
| golang.org/x/term v0.44.0 // indirect | ||
| golang.org/x/text v0.38.0 // indirect | ||
| golang.org/x/time v0.14.0 // indirect | ||
| golang.org/x/tools v0.45.0 // indirect | ||
| google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect | ||
| gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect | ||
| gopkg.in/inf.v0 v0.9.1 // indirect | ||
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| k8s.io/api v0.36.0 // indirect | ||
| k8s.io/client-go v0.36.0 // indirect | ||
| k8s.io/klog/v2 v2.140.0 // indirect | ||
| k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect | ||
| k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 // indirect | ||
| sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect | ||
| sigs.k8s.io/randfill v1.0.0 // indirect | ||
| sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect | ||
| sigs.k8s.io/yaml v1.6.0 // indirect | ||
| ) | ||
|
|
||
| replace ( | ||
| github.com/openshift-online/rosa-hyperfleet-api/api => github.com/openshift-online/rosa-hyperfleet-api/api v0.0.0-20260813062239-c882180ff9a1 | ||
| github.com/openshift-online/rosa-hyperfleet-api/clientset => github.com/openshift-online/rosa-hyperfleet-api/clientset v0.0.0-20260813062239-c882180ff9a1 | ||
| ) | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.