Red Hatã®ç¹ã§ãããRHELã®ãããããããªããµã¼ãã¹ãã調ã¹ããã«ã¤ã³ã¹ãã¤ã¢ããã¦ãOpenShiftçãæ¸ãã¦ã¿ã¾ããã
OpenShiftãã¤ã³ã¹ãã¼ã«ããã¨ãæ§ç¯ç´å¾ããããããã®Podãåãã¦ãã¾ãã æå ã®æ§ç¯ç´å¾ã®OpenShiftã¯ã©ã¹ã¿ã¼(AWSä¸ã®v4.11)ãè¦ã¦ã¿ãã¨ãNamespaceã67åããããã®ä¸ã§Podã200ååãã¦ãã¾ãã (ãã¼ãæ°ã«ãã£ã¦å¤å°å¤ããã¾ããDaemonSetçãããã®ã§)ã
$ oc get ns --no-headers | wc -l 67 $ oc get pod -A --no-headers | grep Running | wc -l 200
ååãè¦ãã ãã§ä½ãããPodãã ãããããããã®ãããã°ãä½ããã¦ããã®ãããããããªãPodããã¾ããæ¬è¨äºã§ã¯ããããã£ããOpenShiftã«ããããããããããªãPod (ãããã¯ã³ã³ãã)ãã調ã¹ãæ¹æ³ãã¾ã¨ãã¾ããã
å ¬å¼ããã¥ã¡ã³ãã§æ¢ã
Podããé¢é£ããã¯ã¼ã¯ãã¼ããªã½ã¼ã¹ (DeploymentãDaemonSetç) ã®ååã§ããã¥ã¡ã³ããæ¤ç´¢ããã¨ãæ å ±ãè¼ã£ã¦ããå ´åãããã¾ãã Red Hat製åã¨ãã¦ã®OpenShiftã®ããã¥ã¡ã³ã㯠access.redhat.com ããã㯠docs.openshift.com ã«ããã¾ãã
åè ã®URLã«ã¯ãæ¥æ¬èªçãããã¾ãã®ã§ãæ´»ç¨ãã ããã å¾è ã®URLã¯è±èªçã®ã¿ã§ãããè¤æ°ã®ããã¥ã¡ã³ãã«ããã£ã¦ä¸²åºãæ¤ç´¢ãã§ãã¾ãã
è±èªçã®ããã¥ã¡ã³ãã¯ãã½ã¼ã¹ãGitHubã§å
¬éãã¦ãã¾ããæå
ã§grepããã人ã¯ãgit cloneãã¦ããã¨ããããããã¾ããã
github.com
æ¤ç´¢ããéã¯ãé©åãªãã©ã³ãããã§ãã¯ã¢ã¦ãããããã«ãã¦ãã ãã (ä¾ãã°v4.11ã®å ´å㯠enterprise-4.11
ã¨ãããã©ã³ãã«ãªãã¾ã)ã
Enhancementsããã¥ã¡ã³ãããããæ¢ã
OpenShiftã®æ©è½æ¡å¼µã®å¤ãã¯ãhttps://github.com/openshift/enhancements ã«ããã¥ã¡ã³ããããã¾ãã KEPã¨åãå½¢å¼ã§ãã¶ã¤ã³ããã¥ã¡ã³ããæ¸ããã¦ãããMotivation, Goals, Non-Goalsçãã¾ã¨ã¾ã£ã¦ãã¾ãã ãPodãä½ããã¦ããããã¨ãã観ç¹ã ã¨ãè¨è¼ã®ç²åº¦ãç´°ããããããããã¾ããããåèã«ãªãå ´åãå¤ãã§ãã
ä¾ãã° openshift-ingress-canary
ã¨ããnamespaceã§ç¨¼åãã ingress-canary
ã¨ããPodã«ã¤ãã¦ãEnhancementsã«æ
å ±ããªãã調ã¹ã¦ã¿ã¾ãããã
$ grep -l -ri 'ingress[- ]canary' enhancements/ enhancements/ingress/ingress-fault-detection.md enhancements/network/dpu/smart-nic-ovn-offload.md
æ¤ç´¢çµæãããhttps://github.com/openshift/enhancements/blob/master/enhancements/ingress/ingress-fault-detection.md ãè¦ã¦ã¿ãã¨ãåèã«ãªãæ å ±ãè¼ã£ã¦ãããã¨ããããã¾ãã
å ·ä½çã«ã¯ãingress-operatorããcanary Podã«å¯¾ãã¦å®æçã«Routerçµç±ã§ã¢ã¯ã»ã¹ãããã¨ã§ãRouteã®ç¨¼å確èªãè¡ã£ã¦ãããã¨ããããã¾ããã
ã³ã³ããã§ç¨¼åããã³ãã³ãã®ãã«ããè¦ã
ã½ã¼ã¹ã³ã¼ããè¦ãã®ã¯ã¡ãã£ã¨...ã¨ããã¨ãã¯ãã³ã³ããå
ã§åãããã»ã¹ãè¦ã¦ããã®ã³ãã³ãã« --help
ãã¤ãã¦å®è¡ãã¦ã¿ãã¨ãä½ãããPodãããããå ´åãããã¾ãã
ä¾ãã°ãopenshift-network-diagnostics
ã¨ããnamespaceã«ã¯ network-check-source
ã¨ããPodãã²ã¨ã¤ã¨ network-check-target
ã¨ããPodããã¼ãæ°ååãã¦ãã¾ãã
$ oc -n openshift-network-diagnostics get pod NAME READY STATUS RESTARTS AGE network-check-source-57b4967df6-w6gft 1/1 Running 0 17d network-check-target-7flvl 1/1 Running 0 17d network-check-target-8sh2v 1/1 Running 0 17d network-check-target-kgjzl 1/1 Running 0 17d network-check-target-psjdg 1/1 Running 0 17d network-check-target-sclmm 1/1 Running 0 17d network-check-target-zxrgm 1/1 Running 0 17d
network-check-source
ã«å
¥ã£ã¦ãåãã¦ããã³ãã³ãã« --help
ãã¤ãã¦å®è¡ãã¦ã¿ã¾ãã
$ oc -n openshift-network-diagnostics exec network-check-source-57b4967df6-w6gft -- ps ax PID TTY STAT TIME COMMAND 1 ? Ssl 65:29 cluster-network-check-endpoints --listen 0.0.0.0:17698 --namespace openshift-network-diagnostics 59 ? Rs 0:00 ps ax $ oc -n openshift-network-diagnostics exec network-check-source-57b4967df6-w6gft -- cluster-network-check-endpoints --help Checks that a tcp connection can be opened to one or more endpoints. Usage: check-endpoints [flags] Flags: --config string Location of the master configuration file to run from. -h, --help help for check-endpoints --kubeconfig string Location of the master configuration file to run from. --listen string The ip:port to serve on. --namespace string Namespace where the controller is running. Auto-detected if run in cluster. --terminate-on-files stringArray A list of files. If one of them changes, the process will terminate.
ãã«ãã¡ãã»ã¼ã¸ãããè¤æ°ã®ã¨ã³ããã¤ã³ãã«å¯¾ãã¦TCPã®ã³ãã¯ã·ã§ã³ãå¼µãããããã§ãã¯ããPodã ã¨ãããã¾ãã
ã½ã¼ã¹ã³ã¼ãã®READMEãè¦ã
GitHubã®ãããã§ãã½ã¼ã¹ã³ã¼ããªãã¸ããªã®ããããã£ã¬ã¯ããªã«ç½®ãããREADME.mdã«ã¯ããã®ãªãã¸ããªã«é¢ããæ å ±ãã¾ã¨ã¾ã£ã¦ãããã¨ãå¤ãã§ãã
åé¡ã¯ãã対象ã¨ãªãPodã®ã½ã¼ã¹ã³ã¼ããã©ãã«ãããããã©ããã£ã¦ç¥ããã§ãããå®ã¯OpenShiftã®Podã¯ãã»ã¨ãã©ã®å ´å SOURCE_GIT_URL
ã¨ããç°å¢å¤æ°ã«ã½ã¼ã¹ã³ã¼ãã®Gitãªãã¸ããªã®URLãè¨å®ããã¦ãã¾ãã
ã¾ã追å ã®è±ç¥èã¨ãã¦ãã³ã³ããã¤ã¡ã¼ã¸ã® /root/buildinfo
ã«ã¯ããã®ã³ã³ããã¤ã¡ã¼ã¸ã®ãã«ãã«ä½¿ç¨ããDockerfileãç½®ããã¦ãã¾ãã
å
ã»ã©ã®ç°å¢å¤æ° SOURCE_GIT_URL
ãDockerfileã®ä¸ã§è¨å®ããã¦ãã¾ããã³ã³ããã®ã¨ã³ããªã¼ãã¤ã³ãã®å¨è¾ºæ
å ±ãå«ãã¦èª¿æ»ããå ´åã¯ãDockerfileãè¦ãã®ãããã§ãããã
Cluster Version Operatorã®å ´å
ä¾ã¨ãã¦ãopenshift-cluster-version
Namespaceã® cluster-version-operator
Podã®Gitãªãã¸ããªã調ã¹ã¦ã¿ã¾ããããã¾ãã該å½Namespaceã®Podã確èªãã¾ãã
$ oc -n openshift-cluster-version get pod NAME READY STATUS RESTARTS AGE cluster-version-operator-678f49cffd-4rxpl 1/1 Running 0 17d
次ã«ã該å½Operatorã® /root/buildinfo
ãè¦ã¾ããPodå
ã«è¤æ°ã®ã³ã³ãããåãã¦ããå ´åã¯ãç®çã®ã³ã³ããåã -c
ãªãã·ã§ã³ã§æå®ãã¦ãã ããã
$ oc -n openshift-cluster-version exec cluster-version-operator-678f49cffd-4rxpl -- ls -F /root/buildinfo Dockerfile-openshift-base-rhel8-v4.11.0-202209130958.p0.gf020942.assembly.stream Dockerfile-openshift-ose-base-v4.11.0-202209130958.p0.gf1330f6.assembly.stream Dockerfile-openshift-ose-cluster-version-operator-v4.11.0-202209130958.p0.gbd8aa51.assembly.stream Dockerfile-ubi8-8.6-754 content_manifests/
ããã¤ãã®Dockerfileããããã¨ããããã¾ããé常ã³ã³ããã¤ã¡ã¼ã¸ã¯ã¬ã¤ã¤ã¼åããã¦ãã¾ãããä»åã®èª¿æ»ç®çããããã¨ãä¸çªä¸ã®å±¤ã®è©²å½ã¢ããªãå ¥ã£ã¦ããã¨æãããDockerfileãè¦ããã§ããã»ã¨ãã©ã®å ´åãã©ããä¸çªä¸ã®å±¤ã®Dockerfileãã¯ããã¡ã¤ã«åãè¦ãã¨ã ããããããã¨æãã¾ãã
ä»åã®å ´åã¯ãDockerfile-openshift-ose-cluster-version-operator-v4.11.0-202209130958.p0.gbd8aa51.assembly.stream
ã該å½ãã¾ãã
$ oc -n openshift-cluster-version exec cluster-version-operator-678f49cffd-4rxpl -- cat /root/buildinfo/Dockerfile-openshift-ose-cluster-version-operator-v4.11.0-202209130958.p0.gbd8aa51.assembly.stream | grep SOURCE_GIT_URL | head -n 1 ENV __doozer=merge OS_GIT_COMMIT=bd8aa51 OS_GIT_VERSION=4.11.0-202209130958.p0.gbd8aa51.assembly.stream-bd8aa51 SOURCE_DATE_EPOCH=1661361071 SOURCE_GIT_COMMIT=bd8aa51be5d4e5cc92462cd066742291ac86786b SOURCE_GIT_TAG=v1.0.0-850-gbd8aa51b SOURCE_GIT_URL=https://github.com/openshift/cluster-version-operator
ç°å¢å¤æ°ããã確èªãã¦ã¿ã¾ãã
$ oc -n openshift-cluster-version exec cluster-version-operator-678f49cffd-4rxpl -- bash -c 'echo $SOURCE_GIT_URL' https://github.com/openshift/cluster-version-operator
cluster-version-operatorã®Gitãªãã¸ããªã¯ https://github.com/openshift/cluster-version-operator ã§ãããã¨ããããã¾ããã
ä¸è¨URLãéãã¨ãããããã£ã¬ã¯ããªã®README.mdã«ã¯æ®å¿µãªãããã¾ãæ
å ±ã¯è¼ã£ã¦ãã¾ããã§ããããããããã£ã¬ã¯ããªç´ä¸ã« docs
ã¨ãããã£ã¬ã¯ããªããããããã«ãæ
å ±ãããããã§ããã¡ãã£ã¨ãã©ãã¨çµå±Enhancementsã«é£ã°ããã¦ããã®è¾ºããèªãã¨cluster-version-operatorã®åããããã£ã¦ãã¾ãã
Node Tuning Operatorã®å ´å
ããã²ã¨ã¤ã®ä¾ã¨ãã¦ãopenshift-cluster-node-tuning-operator
Namespaceã® cluster-node-tuning-operator
Podã調ã¹ã¦ã¿ã¾ããã¾ããDockerfileã確èªãã¾ãã
$ oc -n openshift-cluster-node-tuning-operator exec cluster-node-tuning-operator-7cb5cd8666-9755h -- ls /root/buildinfo ls: cannot access '/root/buildinfo': Permission denied command terminated with exit code 2
Permission denied
ã§æããã¦ãã¾ãã¾ãããå®ã¯ãã®Operatorã¯ãSecurity Contextã¨ã㦠runAsNonRoot: true
ãè¨å®ããã¦ãããroot以å¤ã®ã¦ã¼ã¶ã¼ã§èµ·åããããã/root/buildinfo
ãè¦ããã¨ãã§ãã¾ããã
$ oc -n openshift-cluster-node-tuning-operator get pod cluster-node-tuning-operator-7cb5cd8666-9755h -o json | jq .spec.securityContext { "runAsNonRoot": true, "runAsUser": 499, "seLinuxOptions": { "level": "s0:c14,c4" } }
ãã®ãããªå ´åã¯ãoc debug pod --as-root=1
ã³ãã³ãã使ã£ã¦ãrootã¦ã¼ã¶ã¼ã§ã³ã³ããã«å
¥ãã¾ãã
$ oc -n openshift-cluster-node-tuning-operator debug pod/cluster-node-tuning-operator-7cb5cd8666-9755h --as-root=1 -- ls -F /root/buildinfo 2> /dev/null Dockerfile-openshift-base-rhel8-v4.11.0-202209130958.p0.gf020942.assembly.stream Dockerfile-openshift-ose-base-v4.11.0-202209130958.p0.gf1330f6.assembly.stream Dockerfile-openshift-ose-cluster-node-tuning-operator-v4.11.0-202209131448.p0.g8b73bd5.assembly.stream Dockerfile-ubi8-8.6-754 content_manifests/
Dockerfileã確èªã§ããã®ã§ãä¸ãè¦ã¦ã¿ã¾ãããã
$ oc -n openshift-cluster-node-tuning-operator debug pod/cluster-node-tuning-operator-7cb5cd8666-9755h --as-root=1 -- cat /root/buildinfo/Dockerfile-openshift-ose-cluster-node-tuning-operator-v4.11.0-202209131448.p0.g8b73bd5.assembly.stream 2> /dev/null | grep SOURCE_GIT_URL | head -n 1 ENV __doozer=merge OS_GIT_COMMIT=8b73bd5 OS_GIT_VERSION=4.11.0-202209131448.p0.g8b73bd5.assembly.stream-8b73bd5 SOURCE_DATE_EPOCH=1663062448 SOURCE_GIT_COMMIT=8b73bd580a780daa44fabc1986e9ff4ed0bce33f SOURCE_GIT_TAG=8b73bd58 SOURCE_GIT_URL=https://github.com/openshift/cluster-node-tuning-operator
ã½ã¼ã¹ã³ã¼ãã®ãªãã¸ããªã https://github.com/openshift/cluster-node-tuning-operator ã§ãããã¨ããããã¾ãããä»åã¯ããããã£ã¬ã¯ããªã®README.mdã«æç¨ãªæ å ±ãè¼ã£ã¦ãããcluster-node-tuning-operatorã¯ã«ã¹ã¿ã ãªã½ã¼ã¹Tunedãçµç±ãã¦ãåãã¼ãã®tunedã®è¨å®ã宣è¨çã«ç®¡çããããã®Operatorã§ãããã¨ããããã¾ããã
æå¾ã«
v4.11ã®Podã«ã¤ãã¦ãã¹ãã¬ããã·ã¼ãã«æ å ±ãã¾ã¨ãã¦ã¿ã¾ããã