From 76cef1ecad37dccc1c7cd39c533282bb43104a88 Mon Sep 17 00:00:00 2001 From: Joseph Caiani Date: Tue, 10 Jan 2023 17:33:56 -0500 Subject: [PATCH] Update with review comments, removed fixture, mocked live pod data --- .../src/components/nav/NavHeader.tsx | 6 +- .../fixtures/apiserver-pods.json | 3051 ----------------- .../tests/app/multi-cluster.spec.ts | 68 +- .../integration-tests-cypress/views/nav.ts | 6 +- 4 files changed, 46 insertions(+), 3085 deletions(-) delete mode 100644 frontend/packages/integration-tests-cypress/fixtures/apiserver-pods.json diff --git a/frontend/packages/console-app/src/components/nav/NavHeader.tsx b/frontend/packages/console-app/src/components/nav/NavHeader.tsx index e086a9bfb77..9e42728d41b 100644 --- a/frontend/packages/console-app/src/components/nav/NavHeader.tsx +++ b/frontend/packages/console-app/src/components/nav/NavHeader.tsx @@ -140,7 +140,7 @@ const NavHeader: React.FC = ({ onPerspectiveSelected }) => { component="button" onClick={(e) => onClusterSelect(e, managedCluster)} title={managedCluster} - data-test-id="cluster-switcher-menu-option" + data-test-id="cluster-dropdown-item" > {managedCluster} @@ -202,7 +202,7 @@ const NavHeader: React.FC = ({ onPerspectiveSelected }) => { toggle={ setClusterDropdownOpen(!isClusterDropdownOpen)} - data-test-id="cluster-switcher-toggle" + data-test-id="cluster-dropdown-toggle" > {activePerspective === 'acm' ? ( @@ -231,7 +231,7 @@ const NavHeader: React.FC<NavHeaderProps> = ({ onPerspectiveSelected }) => { : []), ...clusterItems, ]} - data-test-id="cluster-switcher-menu" + data-test-id="cluster-dropdown" /> </div> )} diff --git a/frontend/packages/integration-tests-cypress/fixtures/apiserver-pods.json b/frontend/packages/integration-tests-cypress/fixtures/apiserver-pods.json deleted file mode 100644 index 17487397c87..00000000000 --- a/frontend/packages/integration-tests-cypress/fixtures/apiserver-pods.json +++ /dev/null @@ -1,3051 +0,0 @@ -{ - "kind": "PodList", - "apiVersion": "v1", - "metadata": { - "resourceVersion": "327768" - }, - "items": [ - { - "metadata": { - "name": "bravo-apiserver-566dbfd9db-b2zf6", - "generateName": "apiserver-566dbfd9db-", - "namespace": "openshift-apiserver", - "uid": "6e2dce5b-d169-4408-bb5c-d3aaf34609f3", - "resourceVersion": "24805", - "creationTimestamp": "2023-01-09T13:45:05Z", - "labels": { - "apiserver": "true", - "app": "openshift-apiserver-a", - "openshift-apiserver-anti-affinity": "true", - "pod-template-hash": "566dbfd9db", - "revision": "1" - }, - "annotations": { - "k8s.v1.cni.cncf.io/network-status": "[{\n \"name\": \"openshift-sdn\",\n \"interface\": \"eth0\",\n \"ips\": [\n \"10.130.0.35\"\n ],\n \"default\": true,\n \"dns\": {}\n}]", - "k8s.v1.cni.cncf.io/networks-status": "[{\n \"name\": \"openshift-sdn\",\n \"interface\": \"eth0\",\n \"ips\": [\n \"10.130.0.35\"\n ],\n \"default\": true,\n \"dns\": {}\n}]", - "openshift.io/scc": "node-exporter", - "operator.openshift.io/dep-desired.generation": "6", - "operator.openshift.io/dep-openshift-apiserver.config.configmap": "Y2e4Zw==", - "operator.openshift.io/dep-openshift-apiserver.etcd-client.secret": "BK91Xg==", - "operator.openshift.io/dep-openshift-apiserver.etcd-serving-ca.configmap": "oKiOUQ==", - "operator.openshift.io/dep-openshift-apiserver.image-import-ca.configmap": "bYnrmg==", - "operator.openshift.io/dep-openshift-apiserver.trusted-ca-bundle.configmap": "O1lK1A==" - }, - "ownerReferences": [ - { - "apiVersion": "apps/v1", - "kind": "ReplicaSet", - "name": "apiserver-566dbfd9db", - "uid": "ec82faf2-14da-4d56-a479-6cc6b4c54aeb", - "controller": true, - "blockOwnerDeletion": true - } - ], - "managedFields": [ - { - "manager": "kube-controller-manager", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:45:05Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:operator.openshift.io/dep-desired.generation": {}, - "f:operator.openshift.io/dep-openshift-apiserver.config.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.etcd-client.secret": {}, - "f:operator.openshift.io/dep-openshift-apiserver.etcd-serving-ca.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.image-import-ca.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.trusted-ca-bundle.configmap": {}, - "f:target.workload.openshift.io/management": {} - }, - "f:generateName": {}, - "f:labels": { - ".": {}, - "f:apiserver": {}, - "f:app": {}, - "f:openshift-apiserver-anti-affinity": {}, - "f:pod-template-hash": {}, - "f:revision": {} - }, - "f:ownerReferences": { - ".": {}, - "k:{\"uid\":\"ec82faf2-14da-4d56-a479-6cc6b4c54aeb\"}": {} - } - }, - "f:spec": { - "f:affinity": { - ".": {}, - "f:podAntiAffinity": { - ".": {}, - "f:requiredDuringSchedulingIgnoredDuringExecution": {} - } - }, - "f:containers": { - "k:{\"name\":\"openshift-apiserver\"}": { - ".": {}, - "f:args": {}, - "f:command": {}, - "f:env": { - ".": {}, - "k:{\"name\":\"POD_NAME\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - }, - "k:{\"name\":\"POD_NAMESPACE\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - } - }, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:livenessProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:name": {}, - "f:ports": { - ".": {}, - "k:{\"containerPort\":8443,\"protocol\":\"TCP\"}": { - ".": {}, - "f:containerPort": {}, - "f:protocol": {} - } - }, - "f:readinessProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:securityContext": { - ".": {}, - "f:privileged": {}, - "f:readOnlyRootFilesystem": {}, - "f:runAsUser": {} - }, - "f:startupProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {}, - "f:volumeMounts": { - ".": {}, - "k:{\"mountPath\":\"/var/lib/kubelet/\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {}, - "f:readOnly": {} - }, - "k:{\"mountPath\":\"/var/log/openshift-apiserver\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/audit\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/config\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/etcd-serving-ca\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/image-import-ca\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/trusted-ca-bundle\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/encryption-config\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/etcd-client\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/serving-cert\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - } - } - }, - "k:{\"name\":\"openshift-apiserver-check-endpoints\"}": { - ".": {}, - "f:args": {}, - "f:command": {}, - "f:env": { - ".": {}, - "k:{\"name\":\"POD_NAME\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - }, - "k:{\"name\":\"POD_NAMESPACE\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - } - }, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:name": {}, - "f:ports": { - ".": {}, - "k:{\"containerPort\":17698,\"protocol\":\"TCP\"}": { - ".": {}, - "f:containerPort": {}, - "f:name": {}, - "f:protocol": {} - } - }, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {} - } - }, - "f:dnsPolicy": {}, - "f:enableServiceLinks": {}, - "f:initContainers": { - ".": {}, - "k:{\"name\":\"fix-audit-permissions\"}": { - ".": {}, - "f:command": {}, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:name": {}, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:securityContext": { - ".": {}, - "f:privileged": {}, - "f:runAsUser": {} - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {}, - "f:volumeMounts": { - ".": {}, - "k:{\"mountPath\":\"/var/log/openshift-apiserver\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - } - } - } - }, - "f:nodeSelector": {}, - "f:priorityClassName": {}, - "f:restartPolicy": {}, - "f:schedulerName": {}, - "f:securityContext": {}, - "f:serviceAccount": {}, - "f:serviceAccountName": {}, - "f:terminationGracePeriodSeconds": {}, - "f:tolerations": {}, - "f:volumes": { - ".": {}, - "k:{\"name\":\"audit\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"audit-dir\"}": { - ".": {}, - "f:hostPath": { - ".": {}, - "f:path": {}, - "f:type": {} - }, - "f:name": {} - }, - "k:{\"name\":\"config\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"encryption-config\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:optional": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"etcd-client\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"etcd-serving-ca\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"image-import-ca\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {}, - "f:optional": {} - }, - "f:name": {} - }, - "k:{\"name\":\"node-pullsecrets\"}": { - ".": {}, - "f:hostPath": { - ".": {}, - "f:path": {}, - "f:type": {} - }, - "f:name": {} - }, - "k:{\"name\":\"serving-cert\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"trusted-ca-bundle\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:items": {}, - "f:name": {}, - "f:optional": {} - }, - "f:name": {} - } - } - } - } - }, - { - "manager": "kube-scheduler", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:45:18Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:status": { - "f:conditions": { - ".": {}, - "k:{\"type\":\"PodScheduled\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:message": {}, - "f:reason": {}, - "f:status": {}, - "f:type": {} - } - } - } - }, - "subresource": "status" - }, - { - "manager": "multus", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:46:25Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:k8s.v1.cni.cncf.io/network-status": {}, - "f:k8s.v1.cni.cncf.io/networks-status": {} - } - } - }, - "subresource": "status" - }, - { - "manager": "kubelet", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:46:34Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:status": { - "f:conditions": { - "k:{\"type\":\"ContainersReady\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - }, - "k:{\"type\":\"Initialized\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - }, - "k:{\"type\":\"Ready\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - } - }, - "f:containerStatuses": {}, - "f:hostIP": {}, - "f:initContainerStatuses": {}, - "f:phase": {}, - "f:podIP": {}, - "f:podIPs": { - ".": {}, - "k:{\"ip\":\"10.130.0.35\"}": { - ".": {}, - "f:ip": {} - } - }, - "f:startTime": {} - } - }, - "subresource": "status" - } - ] - }, - "spec": { - "volumes": [ - { - "name": "node-pullsecrets", - "hostPath": { - "path": "/var/lib/kubelet/", - "type": "Directory" - } - }, - { - "name": "config", - "configMap": { - "name": "config", - "defaultMode": 420 - } - }, - { - "name": "audit", - "configMap": { - "name": "audit-1", - "defaultMode": 420 - } - }, - { - "name": "etcd-client", - "secret": { - "secretName": "etcd-client", - "defaultMode": 384 - } - }, - { - "name": "etcd-serving-ca", - "configMap": { - "name": "etcd-serving-ca", - "defaultMode": 420 - } - }, - { - "name": "image-import-ca", - "configMap": { - "name": "image-import-ca", - "defaultMode": 420, - "optional": true - } - }, - { - "name": "serving-cert", - "secret": { - "secretName": "serving-cert", - "defaultMode": 384 - } - }, - { - "name": "trusted-ca-bundle", - "configMap": { - "name": "trusted-ca-bundle", - "items": [ - { - "key": "ca-bundle.crt", - "path": "tls-ca-bundle.pem" - } - ], - "defaultMode": 420, - "optional": true - } - }, - { - "name": "encryption-config", - "secret": { - "secretName": "encryption-config-1", - "defaultMode": 384, - "optional": true - } - }, - { - "name": "audit-dir", - "hostPath": { - "path": "/var/log/openshift-apiserver", - "type": "" - } - }, - { - "name": "kube-api-access-qtxpg", - "projected": { - "sources": [ - { - "serviceAccountToken": { - "expirationSeconds": 3607, - "path": "token" - } - }, - { - "configMap": { - "name": "kube-root-ca.crt", - "items": [ - { - "key": "ca.crt", - "path": "ca.crt" - } - ] - } - }, - { - "downwardAPI": { - "items": [ - { - "path": "namespace", - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - ] - } - }, - { - "configMap": { - "name": "openshift-service-ca.crt", - "items": [ - { - "key": "service-ca.crt", - "path": "service-ca.crt" - } - ] - } - } - ], - "defaultMode": 420 - } - } - ], - "initContainers": [ - { - "name": "fix-audit-permissions", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "command": [ - "sh", - "-c", - "chmod 0700 /var/log/openshift-apiserver \u0026\u0026 touch /var/log/openshift-apiserver/audit.log \u0026\u0026 chmod 0600 /var/log/openshift-apiserver/*" - ], - "resources": { - "requests": { - "cpu": "15m", - "memory": "50Mi" - } - }, - "volumeMounts": [ - { - "name": "audit-dir", - "mountPath": "/var/log/openshift-apiserver" - }, - { - "name": "kube-api-access-qtxpg", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent", - "securityContext": { - "privileged": true, - "runAsUser": 0 - } - } - ], - "containers": [ - { - "name": "openshift-apiserver", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "command": [ - "/bin/bash", - "-ec" - ], - "args": [ - "if [ -s /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem ]; then\n echo \"Copying system trust bundle\"\n cp -f /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem\nfi\nexec openshift-apiserver start --config=/var/run/configmaps/config/config.yaml -v=2\n" - ], - "ports": [ - { - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POD_NAME", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.name" - } - } - }, - { - "name": "POD_NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "resources": { - "requests": { - "cpu": "100m", - "memory": "200Mi" - } - }, - "volumeMounts": [ - { - "name": "node-pullsecrets", - "readOnly": true, - "mountPath": "/var/lib/kubelet/" - }, - { - "name": "config", - "mountPath": "/var/run/configmaps/config" - }, - { - "name": "audit", - "mountPath": "/var/run/configmaps/audit" - }, - { - "name": "etcd-client", - "mountPath": "/var/run/secrets/etcd-client" - }, - { - "name": "etcd-serving-ca", - "mountPath": "/var/run/configmaps/etcd-serving-ca" - }, - { - "name": "image-import-ca", - "mountPath": "/var/run/configmaps/image-import-ca" - }, - { - "name": "trusted-ca-bundle", - "mountPath": "/var/run/configmaps/trusted-ca-bundle" - }, - { - "name": "serving-cert", - "mountPath": "/var/run/secrets/serving-cert" - }, - { - "name": "encryption-config", - "mountPath": "/var/run/secrets/encryption-config" - }, - { - "name": "audit-dir", - "mountPath": "/var/log/openshift-apiserver" - }, - { - "name": "kube-api-access-qtxpg", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "livenessProbe": { - "httpGet": { - "path": "healthz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 10, - "successThreshold": 1, - "failureThreshold": 3 - }, - "readinessProbe": { - "httpGet": { - "path": "readyz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 5, - "successThreshold": 1, - "failureThreshold": 1 - }, - "startupProbe": { - "httpGet": { - "path": "healthz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 5, - "successThreshold": 1, - "failureThreshold": 30 - }, - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent", - "securityContext": { - "privileged": true, - "runAsUser": 0, - "readOnlyRootFilesystem": false - } - }, - { - "name": "openshift-apiserver-check-endpoints", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "command": [ - "cluster-kube-apiserver-operator", - "check-endpoints" - ], - "args": [ - "--listen", - "0.0.0.0:17698", - "--namespace", - "$(POD_NAMESPACE)", - "--v", - "2" - ], - "ports": [ - { - "name": "check-endpoints", - "containerPort": 17698, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POD_NAME", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.name" - } - } - }, - { - "name": "POD_NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "resources": { - "requests": { - "cpu": "10m", - "memory": "50Mi" - } - }, - "volumeMounts": [ - { - "name": "kube-api-access-qtxpg", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent" - } - ], - "restartPolicy": "Always", - "terminationGracePeriodSeconds": 90, - "dnsPolicy": "ClusterFirst", - "nodeSelector": { - "node-role.kubernetes.io/master": "" - }, - "serviceAccountName": "openshift-apiserver-sa", - "serviceAccount": "openshift-apiserver-sa", - "nodeName": "ip-10-0-156-232.ec2.internal", - "securityContext": {}, - "imagePullSecrets": [ - { - "name": "openshift-apiserver-sa-dockercfg-rkhsw" - } - ], - "affinity": { - "podAntiAffinity": { - "requiredDuringSchedulingIgnoredDuringExecution": [ - { - "labelSelector": { - "matchLabels": { - "apiserver": "true", - "app": "openshift-apiserver-a", - "openshift-apiserver-anti-affinity": "true" - } - }, - "topologyKey": "kubernetes.io/hostname" - } - ] - } - }, - "schedulerName": "default-scheduler", - "tolerations": [ - { - "key": "node-role.kubernetes.io/master", - "operator": "Exists", - "effect": "NoSchedule" - }, - { - "key": "node.kubernetes.io/unreachable", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 120 - }, - { - "key": "node.kubernetes.io/not-ready", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 120 - }, - { - "key": "node.kubernetes.io/memory-pressure", - "operator": "Exists", - "effect": "NoSchedule" - } - ], - "priorityClassName": "system-node-critical", - "priority": 2000001000, - "enableServiceLinks": true, - "preemptionPolicy": "PreemptLowerPriority" - }, - "status": { - "phase": "Running", - "conditions": [ - { - "type": "Initialized", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:46:26Z" - }, - { - "type": "Ready", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:46:34Z" - }, - { - "type": "ContainersReady", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:46:34Z" - }, - { - "type": "PodScheduled", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:46:24Z" - } - ], - "hostIP": "10.0.156.232", - "podIP": "10.130.0.35", - "podIPs": [ - { - "ip": "10.130.0.35" - } - ], - "startTime": "2023-01-09T13:46:24Z", - "initContainerStatuses": [ - { - "name": "fix-audit-permissions", - "state": { - "terminated": { - "exitCode": 0, - "reason": "Completed", - "startedAt": "2023-01-09T13:46:26Z", - "finishedAt": "2023-01-09T13:46:26Z", - "containerID": "cri-o://4b6393b45fb7002df13e2883b8ddeaa32830c89f6a2603c49d7964d353fa14dc" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "containerID": "cri-o://4b6393b45fb7002df13e2883b8ddeaa32830c89f6a2603c49d7964d353fa14dc" - } - ], - "containerStatuses": [ - { - "name": "openshift-apiserver", - "state": { - "running": { - "startedAt": "2023-01-09T13:46:26Z" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "containerID": "cri-o://dd1aa4a6a531d4d25a60d9a143c1b7be930dc7a66570619694bf1f188566d9db", - "started": true - }, - { - "name": "openshift-apiserver-check-endpoints", - "state": { - "running": { - "startedAt": "2023-01-09T13:46:27Z" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "containerID": "cri-o://405109f51211d0d240f7890a863630d4ca0bb13ef62952298bb8b09ea6768c19", - "started": true - } - ], - "qosClass": "Burstable" - } - }, - { - "metadata": { - "name": "bravo-apiserver-566dbfd9db-fk4ld", - "generateName": "apiserver-566dbfd9db-", - "namespace": "openshift-apiserver", - "uid": "71ae661d-3dde-4ed3-bdc3-87f6cb356a98", - "resourceVersion": "23147", - "creationTimestamp": "2023-01-09T13:38:24Z", - "labels": { - "apiserver": "true", - "app": "openshift-apiserver-a", - "openshift-apiserver-anti-affinity": "true", - "pod-template-hash": "566dbfd9db", - "revision": "1" - }, - "annotations": { - "k8s.v1.cni.cncf.io/network-status": "[{\n \"name\": \"openshift-sdn\",\n \"interface\": \"eth0\",\n \"ips\": [\n \"10.128.0.68\"\n ],\n \"default\": true,\n \"dns\": {}\n}]", - "k8s.v1.cni.cncf.io/networks-status": "[{\n \"name\": \"openshift-sdn\",\n \"interface\": \"eth0\",\n \"ips\": [\n \"10.128.0.68\"\n ],\n \"default\": true,\n \"dns\": {}\n}]", - "openshift.io/scc": "privileged", - "operator.openshift.io/dep-desired.generation": "6", - "operator.openshift.io/dep-openshift-apiserver.config.configmap": "Y2e4Zw==", - "operator.openshift.io/dep-openshift-apiserver.etcd-client.secret": "BK91Xg==", - "operator.openshift.io/dep-openshift-apiserver.etcd-serving-ca.configmap": "oKiOUQ==", - "operator.openshift.io/dep-openshift-apiserver.image-import-ca.configmap": "bYnrmg==", - "operator.openshift.io/dep-openshift-apiserver.trusted-ca-bundle.configmap": "O1lK1A==" - }, - "ownerReferences": [ - { - "apiVersion": "apps/v1", - "kind": "ReplicaSet", - "name": "apiserver-566dbfd9db", - "uid": "ec82faf2-14da-4d56-a479-6cc6b4c54aeb", - "controller": true, - "blockOwnerDeletion": true - } - ], - "managedFields": [ - { - "manager": "kube-controller-manager", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:38:24Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:operator.openshift.io/dep-desired.generation": {}, - "f:operator.openshift.io/dep-openshift-apiserver.config.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.etcd-client.secret": {}, - "f:operator.openshift.io/dep-openshift-apiserver.etcd-serving-ca.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.image-import-ca.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.trusted-ca-bundle.configmap": {}, - "f:target.workload.openshift.io/management": {} - }, - "f:generateName": {}, - "f:labels": { - ".": {}, - "f:apiserver": {}, - "f:app": {}, - "f:openshift-apiserver-anti-affinity": {}, - "f:pod-template-hash": {}, - "f:revision": {} - }, - "f:ownerReferences": { - ".": {}, - "k:{\"uid\":\"ec82faf2-14da-4d56-a479-6cc6b4c54aeb\"}": {} - } - }, - "f:spec": { - "f:affinity": { - ".": {}, - "f:podAntiAffinity": { - ".": {}, - "f:requiredDuringSchedulingIgnoredDuringExecution": {} - } - }, - "f:containers": { - "k:{\"name\":\"openshift-apiserver\"}": { - ".": {}, - "f:args": {}, - "f:command": {}, - "f:env": { - ".": {}, - "k:{\"name\":\"POD_NAME\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - }, - "k:{\"name\":\"POD_NAMESPACE\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - } - }, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:livenessProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:name": {}, - "f:ports": { - ".": {}, - "k:{\"containerPort\":8443,\"protocol\":\"TCP\"}": { - ".": {}, - "f:containerPort": {}, - "f:protocol": {} - } - }, - "f:readinessProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:securityContext": { - ".": {}, - "f:privileged": {}, - "f:readOnlyRootFilesystem": {}, - "f:runAsUser": {} - }, - "f:startupProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {}, - "f:volumeMounts": { - ".": {}, - "k:{\"mountPath\":\"/var/lib/kubelet/\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {}, - "f:readOnly": {} - }, - "k:{\"mountPath\":\"/var/log/openshift-apiserver\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/audit\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/config\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/etcd-serving-ca\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/image-import-ca\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/trusted-ca-bundle\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/encryption-config\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/etcd-client\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/serving-cert\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - } - } - }, - "k:{\"name\":\"openshift-apiserver-check-endpoints\"}": { - ".": {}, - "f:args": {}, - "f:command": {}, - "f:env": { - ".": {}, - "k:{\"name\":\"POD_NAME\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - }, - "k:{\"name\":\"POD_NAMESPACE\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - } - }, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:name": {}, - "f:ports": { - ".": {}, - "k:{\"containerPort\":17698,\"protocol\":\"TCP\"}": { - ".": {}, - "f:containerPort": {}, - "f:name": {}, - "f:protocol": {} - } - }, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {} - } - }, - "f:dnsPolicy": {}, - "f:enableServiceLinks": {}, - "f:initContainers": { - ".": {}, - "k:{\"name\":\"fix-audit-permissions\"}": { - ".": {}, - "f:command": {}, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:name": {}, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:securityContext": { - ".": {}, - "f:privileged": {}, - "f:runAsUser": {} - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {}, - "f:volumeMounts": { - ".": {}, - "k:{\"mountPath\":\"/var/log/openshift-apiserver\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - } - } - } - }, - "f:nodeSelector": {}, - "f:priorityClassName": {}, - "f:restartPolicy": {}, - "f:schedulerName": {}, - "f:securityContext": {}, - "f:serviceAccount": {}, - "f:serviceAccountName": {}, - "f:terminationGracePeriodSeconds": {}, - "f:tolerations": {}, - "f:volumes": { - ".": {}, - "k:{\"name\":\"audit\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"audit-dir\"}": { - ".": {}, - "f:hostPath": { - ".": {}, - "f:path": {}, - "f:type": {} - }, - "f:name": {} - }, - "k:{\"name\":\"config\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"encryption-config\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:optional": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"etcd-client\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"etcd-serving-ca\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"image-import-ca\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {}, - "f:optional": {} - }, - "f:name": {} - }, - "k:{\"name\":\"node-pullsecrets\"}": { - ".": {}, - "f:hostPath": { - ".": {}, - "f:path": {}, - "f:type": {} - }, - "f:name": {} - }, - "k:{\"name\":\"serving-cert\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"trusted-ca-bundle\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:items": {}, - "f:name": {}, - "f:optional": {} - }, - "f:name": {} - } - } - } - } - }, - { - "manager": "kube-scheduler", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:38:24Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:status": { - "f:conditions": { - ".": {}, - "k:{\"type\":\"PodScheduled\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:message": {}, - "f:reason": {}, - "f:status": {}, - "f:type": {} - } - } - } - }, - "subresource": "status" - }, - { - "manager": "multus", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:44:57Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:k8s.v1.cni.cncf.io/network-status": {}, - "f:k8s.v1.cni.cncf.io/networks-status": {} - } - } - }, - "subresource": "status" - }, - { - "manager": "kubelet", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:45:05Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:status": { - "f:conditions": { - "k:{\"type\":\"ContainersReady\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - }, - "k:{\"type\":\"Initialized\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - }, - "k:{\"type\":\"Ready\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - } - }, - "f:containerStatuses": {}, - "f:hostIP": {}, - "f:initContainerStatuses": {}, - "f:phase": {}, - "f:podIP": {}, - "f:podIPs": { - ".": {}, - "k:{\"ip\":\"10.128.0.68\"}": { - ".": {}, - "f:ip": {} - } - }, - "f:startTime": {} - } - }, - "subresource": "status" - } - ] - }, - "spec": { - "volumes": [ - { - "name": "node-pullsecrets", - "hostPath": { - "path": "/var/lib/kubelet/", - "type": "Directory" - } - }, - { - "name": "config", - "configMap": { - "name": "config", - "defaultMode": 420 - } - }, - { - "name": "audit", - "configMap": { - "name": "audit-1", - "defaultMode": 420 - } - }, - { - "name": "etcd-client", - "secret": { - "secretName": "etcd-client", - "defaultMode": 384 - } - }, - { - "name": "etcd-serving-ca", - "configMap": { - "name": "etcd-serving-ca", - "defaultMode": 420 - } - }, - { - "name": "image-import-ca", - "configMap": { - "name": "image-import-ca", - "defaultMode": 420, - "optional": true - } - }, - { - "name": "serving-cert", - "secret": { - "secretName": "serving-cert", - "defaultMode": 384 - } - }, - { - "name": "trusted-ca-bundle", - "configMap": { - "name": "trusted-ca-bundle", - "items": [ - { - "key": "ca-bundle.crt", - "path": "tls-ca-bundle.pem" - } - ], - "defaultMode": 420, - "optional": true - } - }, - { - "name": "encryption-config", - "secret": { - "secretName": "encryption-config-1", - "defaultMode": 384, - "optional": true - } - }, - { - "name": "audit-dir", - "hostPath": { - "path": "/var/log/openshift-apiserver", - "type": "" - } - }, - { - "name": "kube-api-access-gwx5m", - "projected": { - "sources": [ - { - "serviceAccountToken": { - "expirationSeconds": 3607, - "path": "token" - } - }, - { - "configMap": { - "name": "kube-root-ca.crt", - "items": [ - { - "key": "ca.crt", - "path": "ca.crt" - } - ] - } - }, - { - "downwardAPI": { - "items": [ - { - "path": "namespace", - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - ] - } - }, - { - "configMap": { - "name": "openshift-service-ca.crt", - "items": [ - { - "key": "service-ca.crt", - "path": "service-ca.crt" - } - ] - } - } - ], - "defaultMode": 420 - } - } - ], - "initContainers": [ - { - "name": "fix-audit-permissions", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "command": [ - "sh", - "-c", - "chmod 0700 /var/log/openshift-apiserver \u0026\u0026 touch /var/log/openshift-apiserver/audit.log \u0026\u0026 chmod 0600 /var/log/openshift-apiserver/*" - ], - "resources": { - "requests": { - "cpu": "15m", - "memory": "50Mi" - } - }, - "volumeMounts": [ - { - "name": "audit-dir", - "mountPath": "/var/log/openshift-apiserver" - }, - { - "name": "kube-api-access-gwx5m", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent", - "securityContext": { - "privileged": true, - "runAsUser": 0 - } - } - ], - "containers": [ - { - "name": "openshift-apiserver", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "command": [ - "/bin/bash", - "-ec" - ], - "args": [ - "if [ -s /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem ]; then\n echo \"Copying system trust bundle\"\n cp -f /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem\nfi\nexec openshift-apiserver start --config=/var/run/configmaps/config/config.yaml -v=2\n" - ], - "ports": [ - { - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POD_NAME", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.name" - } - } - }, - { - "name": "POD_NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "resources": { - "requests": { - "cpu": "100m", - "memory": "200Mi" - } - }, - "volumeMounts": [ - { - "name": "node-pullsecrets", - "readOnly": true, - "mountPath": "/var/lib/kubelet/" - }, - { - "name": "config", - "mountPath": "/var/run/configmaps/config" - }, - { - "name": "audit", - "mountPath": "/var/run/configmaps/audit" - }, - { - "name": "etcd-client", - "mountPath": "/var/run/secrets/etcd-client" - }, - { - "name": "etcd-serving-ca", - "mountPath": "/var/run/configmaps/etcd-serving-ca" - }, - { - "name": "image-import-ca", - "mountPath": "/var/run/configmaps/image-import-ca" - }, - { - "name": "trusted-ca-bundle", - "mountPath": "/var/run/configmaps/trusted-ca-bundle" - }, - { - "name": "serving-cert", - "mountPath": "/var/run/secrets/serving-cert" - }, - { - "name": "encryption-config", - "mountPath": "/var/run/secrets/encryption-config" - }, - { - "name": "audit-dir", - "mountPath": "/var/log/openshift-apiserver" - }, - { - "name": "kube-api-access-gwx5m", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "livenessProbe": { - "httpGet": { - "path": "healthz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 10, - "successThreshold": 1, - "failureThreshold": 3 - }, - "readinessProbe": { - "httpGet": { - "path": "readyz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 5, - "successThreshold": 1, - "failureThreshold": 1 - }, - "startupProbe": { - "httpGet": { - "path": "healthz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 5, - "successThreshold": 1, - "failureThreshold": 30 - }, - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent", - "securityContext": { - "privileged": true, - "runAsUser": 0, - "readOnlyRootFilesystem": false - } - }, - { - "name": "openshift-apiserver-check-endpoints", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "command": [ - "cluster-kube-apiserver-operator", - "check-endpoints" - ], - "args": [ - "--listen", - "0.0.0.0:17698", - "--namespace", - "$(POD_NAMESPACE)", - "--v", - "2" - ], - "ports": [ - { - "name": "check-endpoints", - "containerPort": 17698, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POD_NAME", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.name" - } - } - }, - { - "name": "POD_NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "resources": { - "requests": { - "cpu": "10m", - "memory": "50Mi" - } - }, - "volumeMounts": [ - { - "name": "kube-api-access-gwx5m", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent" - } - ], - "restartPolicy": "Always", - "terminationGracePeriodSeconds": 90, - "dnsPolicy": "ClusterFirst", - "nodeSelector": { - "node-role.kubernetes.io/master": "" - }, - "serviceAccountName": "openshift-apiserver-sa", - "serviceAccount": "openshift-apiserver-sa", - "nodeName": "ip-10-0-173-75.ec2.internal", - "securityContext": {}, - "imagePullSecrets": [ - { - "name": "openshift-apiserver-sa-dockercfg-rkhsw" - } - ], - "affinity": { - "podAntiAffinity": { - "requiredDuringSchedulingIgnoredDuringExecution": [ - { - "labelSelector": { - "matchLabels": { - "apiserver": "true", - "app": "openshift-apiserver-a", - "openshift-apiserver-anti-affinity": "true" - } - }, - "topologyKey": "kubernetes.io/hostname" - } - ] - } - }, - "schedulerName": "default-scheduler", - "tolerations": [ - { - "key": "node-role.kubernetes.io/master", - "operator": "Exists", - "effect": "NoSchedule" - }, - { - "key": "node.kubernetes.io/unreachable", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 120 - }, - { - "key": "node.kubernetes.io/not-ready", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 120 - }, - { - "key": "node.kubernetes.io/memory-pressure", - "operator": "Exists", - "effect": "NoSchedule" - } - ], - "priorityClassName": "system-node-critical", - "priority": 2000001000, - "enableServiceLinks": true, - "preemptionPolicy": "PreemptLowerPriority" - }, - "status": { - "phase": "Running", - "conditions": [ - { - "type": "Initialized", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:44:58Z" - }, - { - "type": "Ready", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:45:05Z" - }, - { - "type": "ContainersReady", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:45:05Z" - }, - { - "type": "PodScheduled", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:44:55Z" - } - ], - "hostIP": "10.0.173.75", - "podIP": "10.128.0.68", - "podIPs": [ - { - "ip": "10.128.0.68" - } - ], - "startTime": "2023-01-09T13:44:55Z", - "initContainerStatuses": [ - { - "name": "fix-audit-permissions", - "state": { - "terminated": { - "exitCode": 0, - "reason": "Completed", - "startedAt": "2023-01-09T13:44:57Z", - "finishedAt": "2023-01-09T13:44:57Z", - "containerID": "cri-o://cf7efa4068b8ab08acf43cee763200d9c30607aff7ab2a35477ebac050bb5ed2" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "containerID": "cri-o://cf7efa4068b8ab08acf43cee763200d9c30607aff7ab2a35477ebac050bb5ed2" - } - ], - "containerStatuses": [ - { - "name": "openshift-apiserver", - "state": { - "running": { - "startedAt": "2023-01-09T13:44:59Z" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "containerID": "cri-o://015b5fbc37ee91ed59b4496caa8376e0b88e4433b5e5256fc4a6f47ba5a9b632", - "started": true - }, - { - "name": "openshift-apiserver-check-endpoints", - "state": { - "running": { - "startedAt": "2023-01-09T13:44:59Z" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "containerID": "cri-o://7876663670ba03ebeff2003d2a9a8ada34e7f9edc33419d9af86e6303f3ce7bc", - "started": true - } - ], - "qosClass": "Burstable" - } - }, - { - "metadata": { - "name": "bravo-apiserver-566dbfd9db-tj9lx", - "generateName": "apiserver-566dbfd9db-", - "namespace": "openshift-apiserver", - "uid": "546592cd-98d6-44da-9d60-89d1e4baf079", - "resourceVersion": "25770", - "creationTimestamp": "2023-01-09T13:46:34Z", - "labels": { - "apiserver": "true", - "app": "openshift-apiserver-a", - "openshift-apiserver-anti-affinity": "true", - "pod-template-hash": "566dbfd9db", - "revision": "1" - }, - "annotations": { - "k8s.v1.cni.cncf.io/network-status": "[{\n \"name\": \"openshift-sdn\",\n \"interface\": \"eth0\",\n \"ips\": [\n \"10.129.0.49\"\n ],\n \"default\": true,\n \"dns\": {}\n}]", - "k8s.v1.cni.cncf.io/networks-status": "[{\n \"name\": \"openshift-sdn\",\n \"interface\": \"eth0\",\n \"ips\": [\n \"10.129.0.49\"\n ],\n \"default\": true,\n \"dns\": {}\n}]", - "openshift.io/scc": "node-exporter", - "operator.openshift.io/dep-desired.generation": "6", - "operator.openshift.io/dep-openshift-apiserver.config.configmap": "Y2e4Zw==", - "operator.openshift.io/dep-openshift-apiserver.etcd-client.secret": "BK91Xg==", - "operator.openshift.io/dep-openshift-apiserver.etcd-serving-ca.configmap": "oKiOUQ==", - "operator.openshift.io/dep-openshift-apiserver.image-import-ca.configmap": "bYnrmg==", - "operator.openshift.io/dep-openshift-apiserver.trusted-ca-bundle.configmap": "O1lK1A==" - }, - "ownerReferences": [ - { - "apiVersion": "apps/v1", - "kind": "ReplicaSet", - "name": "apiserver-566dbfd9db", - "uid": "ec82faf2-14da-4d56-a479-6cc6b4c54aeb", - "controller": true, - "blockOwnerDeletion": true - } - ], - "managedFields": [ - { - "manager": "kube-controller-manager", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:46:34Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:operator.openshift.io/dep-desired.generation": {}, - "f:operator.openshift.io/dep-openshift-apiserver.config.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.etcd-client.secret": {}, - "f:operator.openshift.io/dep-openshift-apiserver.etcd-serving-ca.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.image-import-ca.configmap": {}, - "f:operator.openshift.io/dep-openshift-apiserver.trusted-ca-bundle.configmap": {}, - "f:target.workload.openshift.io/management": {} - }, - "f:generateName": {}, - "f:labels": { - ".": {}, - "f:apiserver": {}, - "f:app": {}, - "f:openshift-apiserver-anti-affinity": {}, - "f:pod-template-hash": {}, - "f:revision": {} - }, - "f:ownerReferences": { - ".": {}, - "k:{\"uid\":\"ec82faf2-14da-4d56-a479-6cc6b4c54aeb\"}": {} - } - }, - "f:spec": { - "f:affinity": { - ".": {}, - "f:podAntiAffinity": { - ".": {}, - "f:requiredDuringSchedulingIgnoredDuringExecution": {} - } - }, - "f:containers": { - "k:{\"name\":\"openshift-apiserver\"}": { - ".": {}, - "f:args": {}, - "f:command": {}, - "f:env": { - ".": {}, - "k:{\"name\":\"POD_NAME\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - }, - "k:{\"name\":\"POD_NAMESPACE\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - } - }, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:livenessProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:name": {}, - "f:ports": { - ".": {}, - "k:{\"containerPort\":8443,\"protocol\":\"TCP\"}": { - ".": {}, - "f:containerPort": {}, - "f:protocol": {} - } - }, - "f:readinessProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:securityContext": { - ".": {}, - "f:privileged": {}, - "f:readOnlyRootFilesystem": {}, - "f:runAsUser": {} - }, - "f:startupProbe": { - ".": {}, - "f:failureThreshold": {}, - "f:httpGet": { - ".": {}, - "f:path": {}, - "f:port": {}, - "f:scheme": {} - }, - "f:periodSeconds": {}, - "f:successThreshold": {}, - "f:timeoutSeconds": {} - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {}, - "f:volumeMounts": { - ".": {}, - "k:{\"mountPath\":\"/var/lib/kubelet/\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {}, - "f:readOnly": {} - }, - "k:{\"mountPath\":\"/var/log/openshift-apiserver\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/audit\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/config\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/etcd-serving-ca\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/image-import-ca\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/configmaps/trusted-ca-bundle\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/encryption-config\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/etcd-client\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - }, - "k:{\"mountPath\":\"/var/run/secrets/serving-cert\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - } - } - }, - "k:{\"name\":\"openshift-apiserver-check-endpoints\"}": { - ".": {}, - "f:args": {}, - "f:command": {}, - "f:env": { - ".": {}, - "k:{\"name\":\"POD_NAME\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - }, - "k:{\"name\":\"POD_NAMESPACE\"}": { - ".": {}, - "f:name": {}, - "f:valueFrom": { - ".": {}, - "f:fieldRef": {} - } - } - }, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:name": {}, - "f:ports": { - ".": {}, - "k:{\"containerPort\":17698,\"protocol\":\"TCP\"}": { - ".": {}, - "f:containerPort": {}, - "f:name": {}, - "f:protocol": {} - } - }, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {} - } - }, - "f:dnsPolicy": {}, - "f:enableServiceLinks": {}, - "f:initContainers": { - ".": {}, - "k:{\"name\":\"fix-audit-permissions\"}": { - ".": {}, - "f:command": {}, - "f:image": {}, - "f:imagePullPolicy": {}, - "f:name": {}, - "f:resources": { - ".": {}, - "f:requests": { - ".": {}, - "f:cpu": {}, - "f:memory": {} - } - }, - "f:securityContext": { - ".": {}, - "f:privileged": {}, - "f:runAsUser": {} - }, - "f:terminationMessagePath": {}, - "f:terminationMessagePolicy": {}, - "f:volumeMounts": { - ".": {}, - "k:{\"mountPath\":\"/var/log/openshift-apiserver\"}": { - ".": {}, - "f:mountPath": {}, - "f:name": {} - } - } - } - }, - "f:nodeSelector": {}, - "f:priorityClassName": {}, - "f:restartPolicy": {}, - "f:schedulerName": {}, - "f:securityContext": {}, - "f:serviceAccount": {}, - "f:serviceAccountName": {}, - "f:terminationGracePeriodSeconds": {}, - "f:tolerations": {}, - "f:volumes": { - ".": {}, - "k:{\"name\":\"audit\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"audit-dir\"}": { - ".": {}, - "f:hostPath": { - ".": {}, - "f:path": {}, - "f:type": {} - }, - "f:name": {} - }, - "k:{\"name\":\"config\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"encryption-config\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:optional": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"etcd-client\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"etcd-serving-ca\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {} - }, - "f:name": {} - }, - "k:{\"name\":\"image-import-ca\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:name": {}, - "f:optional": {} - }, - "f:name": {} - }, - "k:{\"name\":\"node-pullsecrets\"}": { - ".": {}, - "f:hostPath": { - ".": {}, - "f:path": {}, - "f:type": {} - }, - "f:name": {} - }, - "k:{\"name\":\"serving-cert\"}": { - ".": {}, - "f:name": {}, - "f:secret": { - ".": {}, - "f:defaultMode": {}, - "f:secretName": {} - } - }, - "k:{\"name\":\"trusted-ca-bundle\"}": { - ".": {}, - "f:configMap": { - ".": {}, - "f:defaultMode": {}, - "f:items": {}, - "f:name": {}, - "f:optional": {} - }, - "f:name": {} - } - } - } - } - }, - { - "manager": "kube-scheduler", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:46:34Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:status": { - "f:conditions": { - ".": {}, - "k:{\"type\":\"PodScheduled\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:message": {}, - "f:reason": {}, - "f:status": {}, - "f:type": {} - } - } - } - }, - "subresource": "status" - }, - { - "manager": "multus", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:47:53Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:k8s.v1.cni.cncf.io/network-status": {}, - "f:k8s.v1.cni.cncf.io/networks-status": {} - } - } - }, - "subresource": "status" - }, - { - "manager": "kubelet", - "operation": "Update", - "apiVersion": "v1", - "time": "2023-01-09T13:48:01Z", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:status": { - "f:conditions": { - "k:{\"type\":\"ContainersReady\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - }, - "k:{\"type\":\"Initialized\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - }, - "k:{\"type\":\"Ready\"}": { - ".": {}, - "f:lastProbeTime": {}, - "f:lastTransitionTime": {}, - "f:status": {}, - "f:type": {} - } - }, - "f:containerStatuses": {}, - "f:hostIP": {}, - "f:initContainerStatuses": {}, - "f:phase": {}, - "f:podIP": {}, - "f:podIPs": { - ".": {}, - "k:{\"ip\":\"10.129.0.49\"}": { - ".": {}, - "f:ip": {} - } - }, - "f:startTime": {} - } - }, - "subresource": "status" - } - ] - }, - "spec": { - "volumes": [ - { - "name": "node-pullsecrets", - "hostPath": { - "path": "/var/lib/kubelet/", - "type": "Directory" - } - }, - { - "name": "config", - "configMap": { - "name": "config", - "defaultMode": 420 - } - }, - { - "name": "audit", - "configMap": { - "name": "audit-1", - "defaultMode": 420 - } - }, - { - "name": "etcd-client", - "secret": { - "secretName": "etcd-client", - "defaultMode": 384 - } - }, - { - "name": "etcd-serving-ca", - "configMap": { - "name": "etcd-serving-ca", - "defaultMode": 420 - } - }, - { - "name": "image-import-ca", - "configMap": { - "name": "image-import-ca", - "defaultMode": 420, - "optional": true - } - }, - { - "name": "serving-cert", - "secret": { - "secretName": "serving-cert", - "defaultMode": 384 - } - }, - { - "name": "trusted-ca-bundle", - "configMap": { - "name": "trusted-ca-bundle", - "items": [ - { - "key": "ca-bundle.crt", - "path": "tls-ca-bundle.pem" - } - ], - "defaultMode": 420, - "optional": true - } - }, - { - "name": "encryption-config", - "secret": { - "secretName": "encryption-config-1", - "defaultMode": 384, - "optional": true - } - }, - { - "name": "audit-dir", - "hostPath": { - "path": "/var/log/openshift-apiserver", - "type": "" - } - }, - { - "name": "kube-api-access-xhvwp", - "projected": { - "sources": [ - { - "serviceAccountToken": { - "expirationSeconds": 3607, - "path": "token" - } - }, - { - "configMap": { - "name": "kube-root-ca.crt", - "items": [ - { - "key": "ca.crt", - "path": "ca.crt" - } - ] - } - }, - { - "downwardAPI": { - "items": [ - { - "path": "namespace", - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - ] - } - }, - { - "configMap": { - "name": "openshift-service-ca.crt", - "items": [ - { - "key": "service-ca.crt", - "path": "service-ca.crt" - } - ] - } - } - ], - "defaultMode": 420 - } - } - ], - "initContainers": [ - { - "name": "fix-audit-permissions", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "command": [ - "sh", - "-c", - "chmod 0700 /var/log/openshift-apiserver \u0026\u0026 touch /var/log/openshift-apiserver/audit.log \u0026\u0026 chmod 0600 /var/log/openshift-apiserver/*" - ], - "resources": { - "requests": { - "cpu": "15m", - "memory": "50Mi" - } - }, - "volumeMounts": [ - { - "name": "audit-dir", - "mountPath": "/var/log/openshift-apiserver" - }, - { - "name": "kube-api-access-xhvwp", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent", - "securityContext": { - "privileged": true, - "runAsUser": 0 - } - } - ], - "containers": [ - { - "name": "openshift-apiserver", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "command": [ - "/bin/bash", - "-ec" - ], - "args": [ - "if [ -s /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem ]; then\n echo \"Copying system trust bundle\"\n cp -f /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem\nfi\nexec openshift-apiserver start --config=/var/run/configmaps/config/config.yaml -v=2\n" - ], - "ports": [ - { - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POD_NAME", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.name" - } - } - }, - { - "name": "POD_NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "resources": { - "requests": { - "cpu": "100m", - "memory": "200Mi" - } - }, - "volumeMounts": [ - { - "name": "node-pullsecrets", - "readOnly": true, - "mountPath": "/var/lib/kubelet/" - }, - { - "name": "config", - "mountPath": "/var/run/configmaps/config" - }, - { - "name": "audit", - "mountPath": "/var/run/configmaps/audit" - }, - { - "name": "etcd-client", - "mountPath": "/var/run/secrets/etcd-client" - }, - { - "name": "etcd-serving-ca", - "mountPath": "/var/run/configmaps/etcd-serving-ca" - }, - { - "name": "image-import-ca", - "mountPath": "/var/run/configmaps/image-import-ca" - }, - { - "name": "trusted-ca-bundle", - "mountPath": "/var/run/configmaps/trusted-ca-bundle" - }, - { - "name": "serving-cert", - "mountPath": "/var/run/secrets/serving-cert" - }, - { - "name": "encryption-config", - "mountPath": "/var/run/secrets/encryption-config" - }, - { - "name": "audit-dir", - "mountPath": "/var/log/openshift-apiserver" - }, - { - "name": "kube-api-access-xhvwp", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "livenessProbe": { - "httpGet": { - "path": "healthz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 10, - "successThreshold": 1, - "failureThreshold": 3 - }, - "readinessProbe": { - "httpGet": { - "path": "readyz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 5, - "successThreshold": 1, - "failureThreshold": 1 - }, - "startupProbe": { - "httpGet": { - "path": "healthz", - "port": 8443, - "scheme": "HTTPS" - }, - "timeoutSeconds": 1, - "periodSeconds": 5, - "successThreshold": 1, - "failureThreshold": 30 - }, - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent", - "securityContext": { - "privileged": true, - "runAsUser": 0, - "readOnlyRootFilesystem": false - } - }, - { - "name": "openshift-apiserver-check-endpoints", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "command": [ - "cluster-kube-apiserver-operator", - "check-endpoints" - ], - "args": [ - "--listen", - "0.0.0.0:17698", - "--namespace", - "$(POD_NAMESPACE)", - "--v", - "2" - ], - "ports": [ - { - "name": "check-endpoints", - "containerPort": 17698, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POD_NAME", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.name" - } - } - }, - { - "name": "POD_NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "resources": { - "requests": { - "cpu": "10m", - "memory": "50Mi" - } - }, - "volumeMounts": [ - { - "name": "kube-api-access-xhvwp", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", - "imagePullPolicy": "IfNotPresent" - } - ], - "restartPolicy": "Always", - "terminationGracePeriodSeconds": 90, - "dnsPolicy": "ClusterFirst", - "nodeSelector": { - "node-role.kubernetes.io/master": "" - }, - "serviceAccountName": "openshift-apiserver-sa", - "serviceAccount": "openshift-apiserver-sa", - "nodeName": "ip-10-0-134-187.ec2.internal", - "securityContext": {}, - "imagePullSecrets": [ - { - "name": "openshift-apiserver-sa-dockercfg-rkhsw" - } - ], - "affinity": { - "podAntiAffinity": { - "requiredDuringSchedulingIgnoredDuringExecution": [ - { - "labelSelector": { - "matchLabels": { - "apiserver": "true", - "app": "openshift-apiserver-a", - "openshift-apiserver-anti-affinity": "true" - } - }, - "topologyKey": "kubernetes.io/hostname" - } - ] - } - }, - "schedulerName": "default-scheduler", - "tolerations": [ - { - "key": "node-role.kubernetes.io/master", - "operator": "Exists", - "effect": "NoSchedule" - }, - { - "key": "node.kubernetes.io/unreachable", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 120 - }, - { - "key": "node.kubernetes.io/not-ready", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 120 - }, - { - "key": "node.kubernetes.io/memory-pressure", - "operator": "Exists", - "effect": "NoSchedule" - } - ], - "priorityClassName": "system-node-critical", - "priority": 2000001000, - "enableServiceLinks": true, - "preemptionPolicy": "PreemptLowerPriority" - }, - "status": { - "phase": "Running", - "conditions": [ - { - "type": "Initialized", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:47:53Z" - }, - { - "type": "Ready", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:48:00Z" - }, - { - "type": "ContainersReady", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:48:00Z" - }, - { - "type": "PodScheduled", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2023-01-09T13:47:50Z" - } - ], - "hostIP": "10.0.134.187", - "podIP": "10.129.0.49", - "podIPs": [ - { - "ip": "10.129.0.49" - } - ], - "startTime": "2023-01-09T13:47:50Z", - "initContainerStatuses": [ - { - "name": "fix-audit-permissions", - "state": { - "terminated": { - "exitCode": 0, - "reason": "Completed", - "startedAt": "2023-01-09T13:47:53Z", - "finishedAt": "2023-01-09T13:47:53Z", - "containerID": "cri-o://79bf8e28dd51e17f8da78c1b746ea2d51ef0032dcef0a18e623d6169f14991ab" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "containerID": "cri-o://79bf8e28dd51e17f8da78c1b746ea2d51ef0032dcef0a18e623d6169f14991ab" - } - ], - "containerStatuses": [ - { - "name": "openshift-apiserver", - "state": { - "running": { - "startedAt": "2023-01-09T13:47:53Z" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c067a0b8576b9f9c1973a57609b82f7b05f74b1790987d7a7424c2fe63ba1bc7", - "containerID": "cri-o://02f7cdbdf1c5d7e97dba4d4855f313f96c241fdf79f90808623305de7dce069f", - "started": true - }, - { - "name": "openshift-apiserver-check-endpoints", - "state": { - "running": { - "startedAt": "2023-01-09T13:47:53Z" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "imageID": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:09461b24c3a8abdac19977c675e0ca60b72a380e1c379e082601da0ee8739d0d", - "containerID": "cri-o://c0661337521378d87f90b5279d3a9b302dfaec427c1c4421bb2b952e10902c39", - "started": true - } - ], - "qosClass": "Burstable" - } - } - ] -} diff --git a/frontend/packages/integration-tests-cypress/tests/app/multi-cluster.spec.ts b/frontend/packages/integration-tests-cypress/tests/app/multi-cluster.spec.ts index 2d7806da843..8151daded9f 100644 --- a/frontend/packages/integration-tests-cypress/tests/app/multi-cluster.spec.ts +++ b/frontend/packages/integration-tests-cypress/tests/app/multi-cluster.spec.ts @@ -4,7 +4,10 @@ import { guidedTour } from '../../views/guided-tour'; import { listPage } from '../../views/list-page'; import { nav } from '../../views/nav'; -const MULTI_CLUSTER_ARRAY = ['apollo-cluster', 'bravo-cluster']; +const LOCAL_CLUSTER = 'local-cluster'; +const APOLLO_CLUSTER = 'apollo-cluster'; +const BRAVO_CLUSTER = 'bravo-cluster'; +const MULTI_CLUSTER_ARRAY = [APOLLO_CLUSTER, BRAVO_CLUSTER]; describe('Multi Cluster Perspective Test', () => { before(() => { cy.login(); @@ -14,9 +17,9 @@ describe('Multi Cluster Perspective Test', () => { guidedTour.close(); cy.window().then((win: any) => { win.SERVER_FLAGS.clusters = MULTI_CLUSTER_ARRAY; + // Now that we've changed the flags, trigger a rerender of the nav by changing perspective nav.sidenav.switcher.changePerspectiveTo('Administrator'); nav.sidenav.switcher.shouldHaveText('Administrator'); - nav.sidenav.clusters.shouldHaveText('local-cluster'); }); }); @@ -25,39 +28,48 @@ describe('Multi Cluster Perspective Test', () => { }); after(() => { - cy.window().then((win: any) => { - win.SERVER_FLAGS.clusters = []; - cy.logout(); - cy.reload(); - }); + cy.logout(); + cy.reload(); }); it('renders cluster switcher in side nav', () => { - nav.sidenav.clusters.shouldHaveText('local-cluster'); + nav.sidenav.clusters.shouldHaveText(LOCAL_CLUSTER); }); it('renders mock pod data of fake bravo-cluster', () => { nav.sidenav.clickNavLink(['Workloads', 'Pods']); + cy.intercept(`api/kubernetes/api/v1/namespaces/openshift-apiserver/pods*${LOCAL_CLUSTER}`).as( + 'fetchLocalPods', + ); projectDropdown.selectProject('openshift-apiserver'); - listPage.rows.shouldBeLoaded(); - listPage.rows.shouldExist('apiserver-'); - // Intercept and return empty arrays for failing fetch calls that we're not targeting for this test. - cy.intercept('/api/kubernetes/apis/console.openshift.io/v1/consolequickstarts*', { - consolequickstarts: [], - }).as('checkQuickstarts'); - cy.intercept('/api/kubernetes/apis/console.openshift.io/v1/consolenotifications*', { - consolenotifications: [], - }).as('checkNotifications'); - cy.intercept('/api/kubernetes/apis/config.openshift.io/v1/clusterversions/version*', { - clusterversions: [], - }).as('checkVersions'); - // Intercept the targeted pods fetch and replace it with the fixture json file - cy.intercept('api/kubernetes/api/v1/namespaces/openshift-apiserver/pods*', { - fixture: 'apiserver-pods.json', - }).as('fetchPods'); - nav.sidenav.clusters.changeClusterTo('bravo-cluster'); - nav.sidenav.clusters.shouldHaveText('bravo-cluster'); - cy.wait('@fetchPods'); - listPage.rows.shouldExist('bravo-apiserver-'); + cy.wait('@fetchLocalPods').then((interception) => { + // Capture local cluster pod data and mock the name by adding bravo-cluster + const bravoMockPods = interception.response?.body; + const mockPods = bravoMockPods?.items.map((podData) => { + podData.metadata.name = `${BRAVO_CLUSTER}-${podData.metadata.name}`; + return podData; + }); + bravoMockPods.items = mockPods; + listPage.rows.shouldBeLoaded(); + listPage.rows.shouldExist('apiserver-'); + // Intercept and return empty arrays for failing fetch calls that we're not targeting for this test. + cy.intercept('/api/kubernetes/apis/console.openshift.io/v1/consolequickstarts*', { + consolequickstarts: [], + }).as('checkQuickstarts'); + cy.intercept('/api/kubernetes/apis/console.openshift.io/v1/consolenotifications*', { + consolenotifications: [], + }).as('checkNotifications'); + cy.intercept('/api/kubernetes/apis/config.openshift.io/v1/clusterversions/version*', { + clusterversions: [], + }).as('checkVersions'); + // Intercept the targeted pods fetch and replace it with the mock pod data + cy.intercept(`api/kubernetes/api/v1/namespaces/openshift-apiserver/pods*${BRAVO_CLUSTER}`, { + ...bravoMockPods, + }).as('fetchBravoPods'); + nav.sidenav.clusters.changeClusterTo(BRAVO_CLUSTER); + nav.sidenav.clusters.shouldHaveText(BRAVO_CLUSTER); + cy.wait('@fetchBravoPods'); + listPage.rows.shouldExist(`${BRAVO_CLUSTER}-apiserver-`); + }); }); }); diff --git a/frontend/packages/integration-tests-cypress/views/nav.ts b/frontend/packages/integration-tests-cypress/views/nav.ts index 11509bb695d..5214ef6e8e3 100644 --- a/frontend/packages/integration-tests-cypress/views/nav.ts +++ b/frontend/packages/integration-tests-cypress/views/nav.ts @@ -12,12 +12,12 @@ export const nav = { .click(), }, clusters: { - shouldHaveText: (text: string) => cy.byLegacyTestID('cluster-switcher-toggle').contains(text), + shouldHaveText: (text: string) => cy.byLegacyTestID('cluster-dropdown-toggle').contains(text), changeClusterTo: (newCluster: string) => cy - .byLegacyTestID('cluster-switcher-toggle') + .byLegacyTestID('cluster-dropdown-toggle') .click() - .byLegacyTestID('cluster-switcher-menu-option') + .byLegacyTestID('cluster-dropdown-item') .contains(newCluster) .click(), },