Skip to content

Conversation

@csrwng
Copy link
Contributor

@csrwng csrwng commented Jul 6, 2023

What this PR does / why we need it:
Replace the internal router deployment with a statically configured instance of haproxy. Remove any additional privileges required by control plane workloads.

Which issue(s) this PR fixes:
Fixes #HOSTEDCP-1090

Checklist

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

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 6, 2023

@csrwng: This pull request references HOSTEDCP-1090 which is a valid jira issue.

Details

In response to this:

What this PR does / why we need it:
Replace the internal router deployment with a statically configured instance of haproxy. Remove any additional privileges required by control plane workloads.

Which issue(s) this PR fixes:
Fixes #HOSTEDCP-1090

Checklist

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

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 6, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 6, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 6, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 6, 2023

@csrwng: This pull request references HOSTEDCP-1090 which is a valid jira issue.

Details

In response to this:

What this PR does / why we need it:
Replace the internal router deployment with a statically configured instance of haproxy. Remove any additional privileges required by control plane workloads.

Which issue(s) this PR fixes:
Fixes #HOSTEDCP-1090

Checklist

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

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/test-infra repository.

@openshift-ci openshift-ci bot added do-not-merge/needs-area area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Jul 6, 2023
@csrwng
Copy link
Contributor Author

csrwng commented Jul 10, 2023

/test verify
/test e2e-aws

@csrwng
Copy link
Contributor Author

csrwng commented Jul 11, 2023

/test e2e-aws

2 similar comments
@csrwng
Copy link
Contributor Author

csrwng commented Jul 11, 2023

/test e2e-aws

@csrwng
Copy link
Contributor Author

csrwng commented Jul 11, 2023

/test e2e-aws

@csrwng csrwng marked this pull request as ready for review July 12, 2023 02:31
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 12, 2023
@openshift-ci openshift-ci bot requested review from enxebre and sjenning July 12, 2023 02:31
@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 12, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2023
}

sa := ignitionserver.ProxyServiceAccount(controlPlaneNamespace)
if result, err := createOrUpdate(ctx, c, sa, func() error {
Copy link
Member

Choose a reason for hiding this comment

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

why is this going away?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the ignition proxy does not need any special permissions on the management cluster. There's no point in having a dedicated service account with role/rolebinding. This was here because we were granting the service account permission to use the host network SCC. We really don't need that. Everything now runs as restricted.

{{ $ns := .Namespace }}
{{- range .Backends }}
backend {{ .Name }}
server {{ .Name }} {{ .DestinationService }}.{{ $ns }}.svc.cluster.local:{{.DestinationPort}} check resolvers coredns init-addr last,libc,none
Copy link
Member

Choose a reason for hiding this comment

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

Do we need the ns and .cluster.local?
Couldn't we just use the name?
If so couldn't this actually be a static hardcoded list?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need either, but that's the full dns name without relying on a search suffix, which I think is less error prone.
I didn't use a static list because we don't always use routes for all services, so I wanted to build the list of things we route to based on existing route resources and rely on the logic that creates routes to tell me which things I should route to here.

@csrwng
Copy link
Contributor Author

csrwng commented Jul 13, 2023

/hold
Both router and ignition-server-proxy need to move to request serving nodes when using that isolation

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 13, 2023
Replace the internal router deployment with a statically configured
instance of haproxy. Remove any additional privileges required by
control plane workloads.
@netlify
Copy link

netlify bot commented Jul 13, 2023

Deploy Preview for hypershift-docs ready!

Name Link
🔨 Latest commit bb74adf
🔍 Latest deploy log https://app.netlify.com/sites/hypershift-docs/deploys/64b077050fc0d40008d7c30d
😎 Deploy Preview https://deploy-preview-2778--hypershift-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@csrwng
Copy link
Contributor Author

csrwng commented Jul 13, 2023

/hold cancel
Updated deployments for request serving

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 13, 2023
Copy link
Member

@bryan-cox bryan-cox left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox, csrwng

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sjenning
Copy link
Contributor

already tagged but lgtm as well 👍

manifests.KubeAPIServerExternalPublicRoute("").Name,
manifests.KubeAPIServerExternalPrivateRoute("").Name:
p.HasKubeAPI = true
continue
Copy link
Contributor

@muraee muraee Jul 14, 2023

Choose a reason for hiding this comment

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

why do we need continue here?

Copy link
Contributor

Choose a reason for hiding this comment

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

just curious, otherwise lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't need it :)
I had that there before that section was inside the case stmt but forgot to remove. It doesn't hurt, but I will remove it in a follow up

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 42afe9a and 2 for PR HEAD bb74adf in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 9134f1d and 1 for PR HEAD bb74adf in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 18, 2023

@csrwng: all tests passed!

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

@csrwng
Copy link
Contributor Author

csrwng commented Jul 31, 2023

Need to consult with IBM Cloud team to determine whether an override for the PSA labels is needed before backporting
cc @rtheis

csrwng added a commit to csrwng/hypershift-1 that referenced this pull request Aug 8, 2023
Introduces an annotation to override the pod security admission label for
hosted control plane namespaces.

This is a follow up to openshift#2778
where the default PSA is now changed to 'Restricted'. For some consumers
like IBM, this label may be too restrictive for other workloads they may
want to run in the control plane namespace.
@rtheis
Copy link
Contributor

rtheis commented Aug 11, 2023

@csrwng we ran some tests and confirmed that baseline PSA labels will work for us but not restricted. If you all intend to proceed with restricted PSA labels then we will need #2886 to override the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants