-
Notifications
You must be signed in to change notification settings - Fork 232
USHIFT-6951: Add metrics-server as optional MicroShift component #6808
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
copejon
wants to merge
20
commits into
openshift:main
Choose a base branch
from
copejon:ushift-6951/metrics-server
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
20 commits
Select commit
Hold shift + click to select a range
6ffde46
USHIFT-6951: add metrics-server Kubernetes manifests
copejon 53c5a00
USHIFT-6951: integrate metrics-server lifecycle management
copejon 611c999
USHIFT-6951: add metrics rebase automation
copejon 064f933
USHIFT-6951: package metrics-server RPM and observability integration
copejon 81d7280
USHIFT-6951: fix otelcol test config for metrics drop-in compatibility
copejon f37e956
USHIFT-6951: unquote YAML keys in audit profiles configmap
copejon 61b222e
USHIFT-6951: fix otelcol arg expansion and add missing release JSON e…
copejon ad3d127
USHIFT-6951: update rebase artifacts and de-dup assets tracker
copejon 6e29665
USHIFT-6951: move metrics cert provisioning to pkg/components
copejon 131595b
USHIFT-6951: fix metrics-server cert provisioning reliability
copejon 4422f5f
USHIFT-6951: narrow kubelet serving CA bundle for metrics-server
copejon 31d8583
USHIFT-6951: use slices.Concat in mergeWorkloads
copejon 21a3084
USHIFT-6951: remove otel-collector integration from metrics-server
copejon 11d0b8b
USHIFT-6951: remove metrics-server rebase logic from shared files
copejon 725e3ff
USHIFT-6951: add standalone cluster-monitoring-operator rebase script
copejon cdfcf33
update last_rebase_cluster_monitoring_operator.sh
copejon 79bfb1e
to simply merging of the components the CMO rebase script is now iden…
copejon 483953f
executed rebase script
copejon 4e3774e
remove errant otel-conf (out of scope), normalize assets files to KSM…
copejon cd8990d
update etcd vendor
copejon 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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: openshift-monitoring | ||
| labels: | ||
| name: openshift-monitoring | ||
| pod-security.kubernetes.io/enforce: privileged | ||
| pod-security.kubernetes.io/audit: privileged | ||
| pod-security.kubernetes.io/warn: privileged | ||
17 changes: 17 additions & 0 deletions
17
assets/optional/metrics-server/01-cluster-role-binding-auth-delegator.yaml
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,17 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/name: auth-delegator | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: metrics-server:system:auth-delegator | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: system:auth-delegator | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: metrics-server | ||
| namespace: openshift-monitoring |
18 changes: 18 additions & 0 deletions
18
assets/optional/metrics-server/01-cluster-role-binding.yaml
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,18 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: system:metrics-server | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: system:metrics-server | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: metrics-server | ||
| namespace: openshift-monitoring | ||
| - kind: User | ||
| name: system:metrics-server |
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,25 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: system:metrics-server | ||
| rules: | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - nodes/metrics | ||
| verbs: | ||
| - get | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - pods | ||
| - nodes | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch |
18 changes: 18 additions & 0 deletions
18
assets/optional/metrics-server/01-role-binding-auth-reader.yaml
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,18 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/name: metrics-server-auth-reader | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: metrics-server-auth-reader | ||
| namespace: kube-system | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: Role | ||
| name: extension-apiserver-authentication-reader | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: metrics-server | ||
| namespace: openshift-monitoring |
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,10 @@ | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: metrics-server | ||
| namespace: openshift-monitoring |
45 changes: 45 additions & 0 deletions
45
assets/optional/metrics-server/02-configmap-audit-profiles.yaml
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,45 @@ | ||
| apiVersion: v1 | ||
| data: | ||
| metadata-profile.yaml: |- | ||
| "apiVersion": "audit.k8s.io/v1" | ||
| "kind": "Policy" | ||
| "metadata": | ||
| "name": "Metadata" | ||
| "omitStages": | ||
| - "RequestReceived" | ||
| "rules": | ||
| - "level": "Metadata" | ||
| none-profile.yaml: |- | ||
| "apiVersion": "audit.k8s.io/v1" | ||
| "kind": "Policy" | ||
| "metadata": | ||
| "name": "None" | ||
| "omitStages": | ||
| - "RequestReceived" | ||
| "rules": | ||
| - "level": "None" | ||
| request-profile.yaml: |- | ||
| "apiVersion": "audit.k8s.io/v1" | ||
| "kind": "Policy" | ||
| "metadata": | ||
| "name": "Request" | ||
| "omitStages": | ||
| - "RequestReceived" | ||
| "rules": | ||
| - "level": "Request" | ||
| requestresponse-profile.yaml: |- | ||
| "apiVersion": "audit.k8s.io/v1" | ||
| "kind": "Policy" | ||
| "metadata": | ||
| "name": "RequestResponse" | ||
| "omitStages": | ||
| - "RequestReceived" | ||
| "rules": | ||
| - "level": "RequestResponse" | ||
| kind: ConfigMap | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: metrics-server-audit-profiles | ||
| namespace: openshift-monitoring |
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,114 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: metrics-server | ||
| namespace: openshift-monitoring | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| strategy: | ||
| type: Recreate | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| openshift.io/required-scc: restricted-v2 | ||
| target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}' | ||
| labels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| spec: | ||
| containers: | ||
| - args: | ||
| - --secure-port=10250 | ||
| - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname | ||
| - --kubelet-use-node-status-port | ||
| - --metric-resolution=15s | ||
| - --kubelet-certificate-authority=/etc/tls/kubelet-serving-ca-bundle/ca-bundle.crt | ||
| - --kubelet-client-certificate=/etc/tls/metrics-server-client-certs/tls.crt | ||
| - --kubelet-client-key=/etc/tls/metrics-server-client-certs/tls.key | ||
| - --tls-cert-file=/etc/tls/private/tls.crt | ||
| - --tls-private-key-file=/etc/tls/private/tls.key | ||
| - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 | ||
| - --shutdown-send-retry-after=true | ||
| - --shutdown-delay-duration=150s | ||
| - --disable-http2-serving=true | ||
| image: "quay.io/openshift/kube-metrics-server" | ||
| imagePullPolicy: IfNotPresent | ||
| livenessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| path: /livez | ||
| port: https | ||
| scheme: HTTPS | ||
| periodSeconds: 10 | ||
| name: metrics-server | ||
| ports: | ||
| - containerPort: 10250 | ||
| name: https | ||
| protocol: TCP | ||
| readinessProbe: | ||
| failureThreshold: 6 | ||
| httpGet: | ||
| path: /readyz | ||
| port: https | ||
| scheme: HTTPS | ||
| initialDelaySeconds: 20 | ||
| periodSeconds: 20 | ||
| resources: | ||
| requests: | ||
| cpu: 1m | ||
| memory: 40Mi | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| readOnlyRootFilesystem: true | ||
| runAsNonRoot: true | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| terminationMessagePolicy: FallbackToLogsOnError | ||
| volumeMounts: | ||
| - mountPath: /etc/tls/private | ||
| name: secret-metrics-server-tls | ||
| - mountPath: /etc/tls/metrics-server-client-certs | ||
| name: secret-metrics-server-client-certs | ||
| - mountPath: /etc/tls/kubelet-serving-ca-bundle | ||
| name: configmap-kubelet-serving-ca-bundle | ||
| - mountPath: /etc/audit | ||
| name: metrics-server-audit-profiles | ||
| readOnly: true | ||
| - mountPath: /var/log/metrics-server | ||
| name: audit-log | ||
| readOnly: false | ||
| nodeSelector: | ||
| kubernetes.io/os: linux | ||
| priorityClassName: system-cluster-critical | ||
| serviceAccountName: metrics-server | ||
| terminationGracePeriodSeconds: 170 | ||
| tolerations: | ||
| - effect: NoSchedule | ||
| key: node-role.kubernetes.io/master | ||
| volumes: | ||
| - name: secret-metrics-server-client-certs | ||
| secret: | ||
| secretName: metrics-server-client-certs | ||
| - name: secret-metrics-server-tls | ||
| secret: | ||
| secretName: metrics-server-tls | ||
| - configMap: | ||
| name: kubelet-serving-ca-bundle | ||
| name: configmap-kubelet-serving-ca-bundle | ||
| - emptyDir: {} | ||
| name: audit-log | ||
| - configMap: | ||
| name: metrics-server-audit-profiles | ||
| name: metrics-server-audit-profiles |
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,21 @@ | ||
| apiVersion: apiregistration.k8s.io/v1 | ||
| kind: APIService | ||
| metadata: | ||
| annotations: | ||
| service.beta.openshift.io/inject-cabundle: "true" | ||
| labels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: v1beta1.metrics.k8s.io | ||
| spec: | ||
| group: metrics.k8s.io | ||
| groupPriorityMinimum: 100 | ||
| insecureSkipTLSVerify: false | ||
| service: | ||
| name: metrics-server | ||
| namespace: openshift-monitoring | ||
| port: 443 | ||
| version: v1beta1 | ||
| versionPriority: 100 |
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,22 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| annotations: | ||
| openshift.io/description: Expose the metrics-server web server on port 443. This port is for internal use, and no other usage is guaranteed. | ||
| service.beta.openshift.io/serving-cert-secret-name: metrics-server-tls | ||
| labels: | ||
| app.kubernetes.io/component: metrics-server | ||
| app.kubernetes.io/managed-by: cluster-monitoring-operator | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring | ||
| name: metrics-server | ||
| namespace: openshift-monitoring | ||
| spec: | ||
| ports: | ||
| - name: https | ||
| port: 443 | ||
| protocol: TCP | ||
| targetPort: https | ||
| selector: | ||
| app.kubernetes.io/name: metrics-server | ||
| app.kubernetes.io/part-of: openshift-monitoring |
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,4 @@ | ||
| images: | ||
| - name: quay.io/openshift/kube-metrics-server | ||
| newName: quay.io/openshift-release-dev/ocp-v5.0-art-dev | ||
| digest: sha256:790dcea1d4cf5eb3a989bf3d14d460148d23a743951644668a300b7fc21f29ec |
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,4 @@ | ||
| images: | ||
| - name: quay.io/openshift/kube-metrics-server | ||
| newName: quay.io/openshift-release-dev/ocp-v5.0-art-dev | ||
| digest: sha256:0590e13d7955f71db964f601f5ce6c66416a1e2e5acee5c2831f41fb2b13435c |
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,13 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - 00-namespace.yaml | ||
| - 01-service-account.yaml | ||
| - 01-cluster-role.yaml | ||
| - 01-cluster-role-binding.yaml | ||
| - 01-cluster-role-binding-auth-delegator.yaml | ||
| - 01-role-binding-auth-reader.yaml | ||
| - 02-configmap-audit-profiles.yaml | ||
| - 03-deployment.yaml | ||
| - 04-service.yaml | ||
| - 04-api-service.yaml | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
8 changes: 8 additions & 0 deletions
8
assets/optional/metrics-server/release-metrics-server-aarch64.json
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,8 @@ | ||
| { | ||
| "release": { | ||
| "base": "5.0.0-0.nightly-arm64-2026-06-19-154904" | ||
| }, | ||
| "images": { | ||
| "metrics_server": "quay.io/openshift-release-dev/ocp-v5.0-art-dev@sha256:790dcea1d4cf5eb3a989bf3d14d460148d23a743951644668a300b7fc21f29ec" | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
assets/optional/metrics-server/release-metrics-server-x86_64.json
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,8 @@ | ||
| { | ||
| "release": { | ||
| "base": "5.0.0-0.nightly-2026-06-19-155631" | ||
| }, | ||
| "images": { | ||
| "metrics_server": "quay.io/openshift-release-dev/ocp-v5.0-art-dev@sha256:0590e13d7955f71db964f601f5ce6c66416a1e2e5acee5c2831f41fb2b13435c" | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
etcd/vendor/github.com/openshift/microshift/pkg/util/cryptomaterial/certinfo.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.