kubernetes/kubernetes
#oss
https://github.com/kubernetes/kubernetes/pulls?page=4&q=is%3Apr+author%3Asanposhiho
issue
code: zsh
$ kubectl config delete-cluster
Delete the specified cluster from the kubeconfig.
Examples:
# Delete the minikube cluster
kubectl config delete-cluster minikube
Usage:
kubectl config delete-cluster NAME options
Use "kubectl options" for a list of global command-line options (applies to all commands).
code: zsh
$ kubectl config delete-user
error: user to delete is required
See 'kubectl config delete-user -h' for help and examples
code: zsh
$ kubectl config delete-context
Delete the specified context from the kubeconfig.
Examples:
# Delete the context for the minikube cluster
kubectl config delete-context minikube
Usage:
kubectl config delete-context NAME options
Use "kubectl options" for a list of global command-line options (applies to all commands).
issue
https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md
https://kubernetes.io/docs/reference/glossary/?all=true#term-mirror-pod
https://github.com/kubernetes/autoscaler/pull/5609
issue
i18n
https://github.com/kubernetes/kubectl/blob/ae06e7f4c454b070761fb8b7d2d4a476d6075b6e/pkg/util/i18n/translations/kubectl/ja_JP/LC_MESSAGES/k8s.po#L450
https://github.com/sinatra/sinatra/pull/1807
https://github.com/kubernetes/kubernetes/pulls?page=2&q=is%3Apr+author%3Asanposhiho+is%3Aclosed
Clean up: delete NumUnschedulablePods because it's no longer in use
https://github.com/kubernetes/kubectl/tree/master/pkg/util/i18n/translations
cleanup: use i18n.T on all command descriptions
How To Upgrade Your Bash Version On Mac OS?
https://github.com/golang/go/issues/36383
i18n.T\((.*)\) -> $1
i18n.T\(("[\s\S\n]*?")\)
astutil.Applyで抽象構文木を置き換える
Refactoring Go code using AST replacement
cleanup: Remove support for i18n in kubectl
issue
読めそう
PodにQuality of Serviceを設定する
issue
chore(node/util): add more labels to deprecatedNodeLabels
https://github.com/kubernetes/kubernetes/blob/ec87834bae787ab6687921d65c3bcfde8a6e01b9/pkg/api/node/util.go#L28
add deprecated warning for node beta labels in pv/sc/rc/csi storage capacity
https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesioregion
Used on: Node で grep
https://kubernetes.io/docs/reference/labels-annotations-taints/#scheduleralphakubernetesio-preferavoidpods
https://kubernetes.io/docs/reference/labels-annotations-taints/#node-role-kubernetes-io-master-taint
issue
test
https://github.com/kubernetes/kubectl/tree/ae06e7f4c454b070761fb8b7d2d4a476d6075b6e/pkg/apply
もうない
issue
test
https://github.com/kubernetes/kubernetes/tree/6264fd9dadb26019b6165d3f73e1b12f89d4adfd/staging/src/k8s.io/kubectl/pkg/cmd/util/sanity
test
https://github.com/kubernetes/kubectl/blob/197123726db24c61aa0f78d1f0ba6e91a2ec2f35/pkg/cmd/util/podcmd/podcmd.go
code: zsh
~/Desktop/kubernetes/staging/src/k8s.io/kubectl/pkg/cmd/util/podcmd
$ go test -v -run TestFindContainerByName
issue
Invalid deprecation information in k8s.io/apimachinery/pkg/util/wait
Suggestion from Deprecation Notice for NewExponentialBackoffManager not Working
wait: Introduce new methods that allow detection of context cancellation
issue
Missing documentation on FilteringResourceEventHandler behavior with dynamic filters
test: clarify FilteringResourceEventHandler behavior
code: go.work
go 1.20
use (
./staging/src/k8s.io/client-go
)
Goで並行処理(基本編)
code: controller_test.go
func TestDynamicFilteringResourceEventHandler(t *testing.T) {
src := []string{"a", "b", "c", "d", "e"}
dst := []string{}
handler := FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
value, ok := obj.(string)
return ok && slices.Contains(dst, value)
},
Handler: ResourceEventHandlerFuncs{
// conflicts are not handled in FilterFunc, so "add" is output randomly
AddFunc: func(obj interface{}) {
t.Logf("add")
},
},
}
for _, s := range src {
go func(s string) {
result := s + "foo"
time.Sleep(time.Second)
dst = append(dst, result)
}(s)
}
time.Sleep(time.Second)
handler.OnAdd(nil, false)
}
issue
"k8s.io/utils/strings/slices"
https://go.dev/blog/go1.21
New slices package for common operations on slices of any element type. This includes sorting functions that are generally faster and more ergonomic than the sort package.
issue
test/e2e/storage: reduce privileges granted to pods
e2e: support admissionapi.LevelRestricted in test/e2e/framework/volume
https://kubernetes.io/docs/concepts/security/pod-security-standards/
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
https://github.com/kubernetes/kubernetes/tree/master/build
code: zsh
$ sudo ./run.sh
Password:
+++ 0810 21:13:17 Verifying Prerequisites....
!!! Cannot find GNU tar. Build on Linux or install GNU tar
on Mac OS X (brew install gnu-tar).
$ brew install gnu-tar
$ sudo ./run.sh
+++ 0810 21:14:57 Verifying Prerequisites....
+++ 0810 21:14:57 Using docker on macOS
+++ 0810 21:14:59 Building Docker image kube-build:build-6b87707141-5-v1.27.0-go1.20.7-bullseye.0
+++ 0810 21:15:30 Creating data container kube-build-data-6b87707141-5-v1.27.0-go1.20.7-bullseye.0
+++ 0810 21:15:30 Syncing sources to container
+++ 0810 21:15:36 Output from this container will be rsynced out upon completion. Set KUBE_RUN_COPY_OUTPUT=n to disable.
+++ 0810 21:15:36 Running build command...
Invalid input - please specify a command to run.
!!! 0810 21:15:36 Call tree:
!!! 0810 21:15:36 1: ./run.sh:39 kube::build::run_build_command(...)
https://github.com/kubernetes/kubernetes/blob/master/README.md#to-start-developing-k8s
Go の GOPATH 環境変数
code: zsh
~/desktop
$ echo $GOPATH
~/desktop
$ go env GOPATH
/Users/wafuwafu13/go
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/e2e-tests.md
https://kubernetes.io/blog/2019/03/22/kubernetes-end-to-end-testing-for-everyone/#adding-e2e-storage-tests
https://kubernetes.io/blog/2019/03/22/kubernetes-end-to-end-testing-for-everyone/#compiling-and-running-the-test-suite
https://onsi.github.io/ginkgo/
code: zsh
~/go/src/k8s.io/kubernetes
$ go install ./test/e2e
~/go/src/k8s.io/kubernetes
$ go install ./test/e2e
# k8s.io/kubernetes/test/e2e/common/storage
test/e2e/common/storage/framework.go:23:48: undefined: bod
$ make WHAT=test/e2e/e2e.test
go version go1.20.7 darwin/arm64
+++ 0811 22:34:08 Setting GOMAXPROCS: 10
!!! 0811 22:34:09 Failed to find GNU date as date or gdate. If you are on Mac: brew install coreutils.
/Users/wafuwafu13/go/src/k8s.io/kubernetes/hack/lib/version.sh: 行 168: DATE: 未割り当ての変数です
+++ 0811 22:34:09 Building go targets for darwin/arm64
k8s.io/kubernetes/test/e2e/e2e.test (test)
code: zsh
~/go/src/k8s.io/test-infra
$ GO111MODULE=on go install ./kubetest
~/go/src/k8s.io/kubernetes
$ kubetest --build --up --test --down
2023/08/11 23:06:11 Warning: Couldn't find directory src/sigs.k8s.io/cloud-provider-azure under any of GOPATH /Users/wafuwafu13/go, defaulting to /Users/wafuwafu13/go/src/k8s.io/cloud-provider-azure
2023/08/11 23:06:11 main.go:281: Running kubetest version:
2023/08/11 23:06:11 process.go:153: Running: make -C /Users/wafuwafu13/go/src/k8s.io/kubernetes all
go version go1.20.7 darwin/arm64
+++ 0811 23:06:11 Setting GOMAXPROCS: 10
+++ 0811 23:06:11 Building go targets for darwin/arm64
k8s.io/kubernetes/cmd/kube-proxy (static)
$ make all
go version go1.20.7 darwin/arm64
+++ 0811 23:10:07 Setting GOMAXPROCS: 10
+++ 0811 23:10:08 Building go targets for darwin/arm64
k8s.io/kubernetes/cmd/kube-proxy (static)
k8s.io/kubernetes/cmd/kube-apiserver (static)
k8s.io/kubernetes/cmd/kube-controller-manager (static)
k8s.io/kubernetes/cmd/kubelet (non-static)
k8s.io/kubernetes/cmd/kubeadm (static)
k8s.io/kubernetes/cmd/kube-scheduler (static)
k8s.io/component-base/logs/kube-log-runner (static)
k8s.io/kube-aggregator (static)
k8s.io/apiextensions-apiserver (static)
k8s.io/kubernetes/cluster/gce/gci/mounter (non-static)
k8s.io/kubernetes/cmd/kubectl (non-static)
k8s.io/kubernetes/cmd/kubectl-convert (static)
github.com/onsi/ginkgo/v2/ginkgo (non-static)
k8s.io/kubernetes/test/e2e/e2e.test (test)
k8s.io/kubernetes/test/conformance/image/go-runner (non-static)
k8s.io/kubernetes/cmd/kubemark (static)
github.com/onsi/ginkgo/v2/ginkgo (non-static)
code: zsh
$ kubetest --build --up --test --down
Could not detect Google Cloud Platform project. Set the default project using
'gcloud config set project <PROJECT>'