network policies and metrics tweaks#1013
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rphillips The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@rphillips: No Jira issue with key OCPBUGS-93479 exists in the tracker at https://issues.redhat.com/. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
| @@ -1,4 +1,10 @@ | |||
| <<<<<<<< HEAD:bindata/assets/kueue-operator/networkpolicy/10-allow-ingress-egress-metrics.yaml | |||
There was a problem hiding this comment.
looks like there are some conflict issues here.
|
@rphillips: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
This PR creates the necessary network policies at operator startup. It also creates a separate metrics kubernetes service just for the operator. This way we get metrics for the operator without creating the Kueue Custom Resource. Once the Kueue Custom Resource is created then everything else gets deployed which includes the operand metrics service monitor.
Network Policy Reorganization
operator/andoperand/subdirectories underbindata/assets/kueue-operator/networkpolicy/01-allow-egress-api.yaml- egress to kube-apiserver02-allow-egress-cluster-dns.yaml- egress to cluster DNS03-allow-ingress-metrics.yaml- ingress from Prometheus99-deny-all.yaml- default deny01-allow-egress-api.yaml- egress to kube-apiserver02-allow-egress-cluster-dns.yaml- egress to cluster DNS03-allow-ingress-webhook.yaml- ingress for webhooks04-allow-ingress-visibility.yaml- ingress for visibility05-allow-ingress-metrics.yaml- ingress for metrics99-deny-all.yaml- default denyOperator Metrics & Monitoring
CertificateandIssuerresources for automatic TLS certificate managementRBAC Enhancements
subjectaccessreviews.authorization.k8s.iocreate permissiontokenreviews.authentication.k8s.iocreate permissionDeployment Changes
/etc/metrics-tlsto/var/run/secrets/serving-certDynamicServingCertificateControllerfor automatic certificate reloadingCode Changes
ensureOperatorNetworkPolicies()- applies operator network policies during controller initializationensureOperatorServiceMonitor()- creates ServiceMonitor if CRD is availableensurePrometheusRBAC()- creates RBAC resources for Prometheus metrics access