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

[WIP] Add ECR credential provider to nodepool controller #4377

Closed
wants to merge 1,671 commits into from

Conversation

hectorakemp
Copy link

Resolves https://issues.redhat.com/browse/OSD-24468

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

qinqon and others added 30 commits June 12, 2024 17:55
This reverts commit 1927260.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
…-old-scripts

HOSTEDCP-1446: hack: remove old arguments and scripts
BUCKET_NAME is required to be exported to be accessed by the process that creates policy.json
…p-job

HOSTEDCP-1402: cmd/infra/aws/destroy: allow using component credentials
The goal of this refactor is to reduce the complexity in the
command-line tooling. Overall, the changes here remove duplicative
structures that copied data around and co-locate the logic with the
data, instead of first aggregating all data into one uber-structure and
then conditionally acting on that structure. These refactors have a
number of benefits:

 - locality of behavior: in the past, it was very difficult if not
   impossible to determine where a value was used, as it would be bound
   to a flag in one package, copied around between container structs a
   couple of times, then have some generic logic act on the presence or
   absence of the value to e.g. change a field on the HostedCluster.
   Simply reading the generic logic was often not enough to understand
   what was going on, as many of the conditional branches in the example
   fixture code could only ever trigger for one specific platform, and
   you'd never know unless you traced how the example options
   uber-struct had its fields set in every provider.
 - clear go-to-definition: as a knock-on effect of the above, now
   there's *one* structure that holds a command-line flag and it's
   trivial to use the LSP when determining where that flag is used and
   how
 - composability: as exemplified in the KubeVirt NodePool code, we are
   able to compose commands as necessary. When commands re-use the same
   arguments with the same flags and the same validation logic, there's
   no need to copy things around and re-implement anything; by
   localizing flag binding, validation and option completion, we gain
   small, composable parts that we can use to build larger commands with

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
We only bind flags in one routine now; breaking out explicitly the set
of flags that should only be exposed to developers in the `hypershift`
CLI. The net effect of this change is to expose `--base-domain-prefix`
and `--external-dns-domain` to users of `hcp`.

This change also shows how to change the defaults in an option set for a
command - the `hcp create cluster` command has a unique default for the
control plane availability policy, and its now evident that this is the
case since it has to be done explicitly after building the default set
of options.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
…te-resource-creation

HOSTEDCP-1542: cmd/cluster: refactor to remove example fixtures
This enables data plane -> kubernetes.svc traffic and any external dns traffic to use a common router for all HCs in Azure.
The initial goal is to start transitioning the code structure (reconcilers, APIs, helpers...) towards a shared ingress oriented solution using haproxy as presented for simplicity.
Main changes are:
- Change existing data plane haproxy to forward request to the management kas SVC IP.
- Add a new haproxy in the data plane that listens on the management kas SVC IP and forwards requests to the remote shared ingress.
- Introduce a new common shared ingress for the all the HC fleet management side and uses the proxy protocol to discriminate traffic originated via data plane kubernetes.svc by the dst API of theKAS SVC in the management cluster.
- Update endpoints routes to use the new shared ingress router and stop deploying the per HC router.
Follow ups: PDBs, Network policies, evaluate alternative or adhoc solutions to haproxy, explore how to remove data plane hops, proxy integration, private/public support...
HOSTEDCP-1721: Enable shared ingress for Azure
- fixed platfrom specifc validation not being executed
- ResourceGroupName, VNetID and SubnetID
Signed-off-by: David Vossel <davidvossel@gmail.com>
Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
Humans make mistakes and the compiler is here to help. The pattern in
this commit is esoteric, but widespread in the Kubernetes ecosystem for
creating options structs that *must* be validated and completed before
being used. The type gymanstics are not ideal but the end experience is
not degraded since we're embedding everything.

In total, the pattern has a couple benefits:
 - enforcement of validation and completion
 - clear distinction between user input (via flags) and computed input
 - obvious flow for re-use in code consumers

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
We need to seed the random readers we use in these tests or the output
will never be testable.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
We need the `--render` output to be deterministic in order to easily
test what we're doing.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
This seems to be an oversight, as we never validated the options in the
past.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
HOSTEDCP-1542: Fixed infra-id not being defaulted first
EmilienM and others added 5 commits July 23, 2024 09:01
* CLI options for cluster create & destroy. More options
  will come with Node pools and in the future with more usecases.
* Set a default Machine Network when creating the cluster with the CLI.
* Add the CLI options to e2e.
OSASINFRA-3538: openstack: cluster CLI
OSASINFRA-3539: Add ipam to cluster-api assets
OSASINFRA-3312: Implements OpenStack Node pools
@hectorakemp hectorakemp force-pushed the RFE-5711 branch 2 times, most recently from 9de8ee3 to d1891ce Compare July 24, 2024 15:41
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hectorakemp hectorakemp force-pushed the RFE-5711 branch 2 times, most recently from 4f9484c to a5b7d17 Compare July 24, 2024 15:58
@openshift-ci openshift-ci bot added area/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation labels Jul 24, 2024
Copy link
Contributor

openshift-ci bot commented Aug 1, 2024

@hectorakemp: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aks d4d4f90 link false /test e2e-aks
ci/prow/e2e-azure d4d4f90 link false /test e2e-azure
ci/prow/e2e-ibmcloud-roks 9fde636 link false /test e2e-ibmcloud-roks
ci/prow/e2e-kubevirt-aws-ovn 9fde636 link true /test e2e-kubevirt-aws-ovn
ci/prow/unit 9fde636 link true /test unit
ci/prow/verify 9fde636 link true /test verify
ci/prow/e2e-aws 9fde636 link true /test e2e-aws
ci/prow/images 9fde636 link true /test images
ci/prow/e2e-ibmcloud-iks 9fde636 link false /test e2e-ibmcloud-iks
ci/prow/e2e-kubevirt-aws-ovn-reduced 9fde636 link true /test e2e-kubevirt-aws-ovn-reduced

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 30, 2024
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 30, 2024
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this Dec 30, 2024
Copy link
Contributor

openshift-ci bot commented Dec 30, 2024

@openshift-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.