Skip to content
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

Support Dev Containers / Github Codespaces #120551

Closed
wants to merge 651 commits into from
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
651 commits
Select commit Hold shift + click to select a range
2493931
test: fix boilerplate
alexzielenski Oct 12, 2023
caded80
cleanup: add godoc
alexzielenski Oct 13, 2023
39db883
cleanup: consistent interface{} and any
alexzielenski Oct 13, 2023
9e7e309
cleanup: clarify correlatedOldValueForChildAtNewIndex comment
alexzielenski Oct 13, 2023
933b3e1
cleanup: consistently support nil receiver and document
alexzielenski Oct 13, 2023
3249a06
cleanup: use swtich in CachedDeepEqual and add more comments
alexzielenski Oct 13, 2023
3c2a0f7
comments: clear up correlateOldValueForChildAtNewIndex godoc
alexzielenski Oct 13, 2023
66b92fe
ratcheting: disable correlation by index
alexzielenski Oct 13, 2023
f0cee2b
k8s.io/apiserver/storage: add a new TestCreate case.
siyuanfoundation Oct 11, 2023
c8ef635
fix limitrange flaky test
carlory Oct 12, 2023
daa3b98
remove GAed FG DownwardAPIHugePages
pacoxu Aug 30, 2023
97e0ba1
Fix v3 spec
Jefftree Oct 4, 2023
ad85563
bump kube-openapi
Jefftree Oct 12, 2023
81f3b84
remove deprecated framework.ExpectNotEqual for node
bzsuni Oct 12, 2023
11756d8
cri-api: compress OWNERS files
haircommander Oct 16, 2023
ddf18a0
Keep PLEG interruptions in a separate interface
harche Apr 26, 2023
8f9a459
add validation for static pods to have a name
YTGhost Jul 26, 2023
1c0dc37
track unmaintained repo - mailru/easyjson
dims Oct 15, 2023
ad0767b
kubeadm: remove `ClusterConfiguration` parameter from preflight check
chendave Oct 17, 2023
57ade7c
kube-apiserver: move cloud provider validation into options
sttts Oct 10, 2023
24cf6d7
Remove GA featuregate about ProbeTerminationGracePeriod in 1.29
bzsuni Oct 16, 2023
97b8377
Revert "podresources: e2e: force eager connection"
kannon92 Oct 16, 2023
f4932ba
kubeadm: fix "eliptic" typo in API package
neolit123 Oct 17, 2023
d34d004
Add runtime handler field to ImageSpec
kiashok Aug 16, 2023
2ff9849
Update cri-api change in v1.29.0
kiashok Oct 16, 2023
3ee447d
k8s.io/apiserver/storage: add 3 new unit tests for delete.
siyuanfoundation Oct 11, 2023
a16b415
Revert "kubeadm: FeatureGate MergeCLIArgumentsWithConfig is added for…
pacoxu Oct 17, 2023
66fe00a
update filepath-securejoin dependency to 0.2.4 to fix security vulner…
lvedder Sep 25, 2023
d7b3e00
run hack scripts to update cyphar/filepath-securejoin to v0.2.4 corre…
lvedder Oct 17, 2023
bf2b863
staging/apiserver: correct KubeConfigFile type in authorization types
palnabarun Sep 27, 2023
cb0b348
unittests: Fixes hostutil.GetFileType for Windows
claudiubelu Dec 7, 2022
f2ca00a
Match on cri-o socket suffix only
dgl Jun 16, 2023
1bdb071
fix(test): fix error handling condition in test
Ithrael Aug 27, 2023
6c8c126
fix(test): fix error comparison in GetPodResourcesV1 test
Ithrael Aug 28, 2023
e5f782a
fix(test): fix TestGetPodResourcesV1 comparison logic in tests
Ithrael Aug 30, 2023
056b73a
Set gate SkipReadOnlyValidationGCE to Deprecated
thockin Oct 9, 2023
f5cbac8
Add test case for sandbox condition if pod fails to mount volume from…
charles-chenzz Oct 13, 2023
aba08be
Job: Handle error returned from AddEventHandler function (#119917)
tenzen-y Oct 17, 2023
c9458f4
fix possible panic if pod replacement policy is turned on and jobs do…
kannon92 Oct 5, 2023
231279e
clean up deprecated funcs in e2e framework
carlory Oct 9, 2023
9db07d4
kubelet: fix comment typo
champly May 22, 2023
baedffd
set maxLength to longest enum.
jiahuif Oct 9, 2023
dedaa5e
skip CEL validations for enum violation.
jiahuif Oct 17, 2023
611cfea
fix: improve assertion for Failed PodReplacementPolicy integration te…
dejanzele Oct 16, 2023
80cd5ad
cleanup: add new test cases for failed pod replacement policy instead…
dejanzele Oct 17, 2023
5b0bb69
fix: typo in indexed & non-indexed completion policies for failed pod…
dejanzele Oct 17, 2023
6e53e88
fix: improve PodReplacementPolicy integration test case names and upd…
dejanzele Oct 17, 2023
61f791e
fix: minor lint issues and redundant check
dejanzele Oct 17, 2023
bb31f7a
cleanup: remove redundant logic in PodReplacementPolicy integration t…
dejanzele Oct 17, 2023
7b02ecc
Fix panic if there are more terminating pods than active pods
kannon92 Oct 5, 2023
71a1cc5
Remove GAed feature gates TopologyManager
tukwila Oct 16, 2023
7fb4e06
kubeadm: remove reference to UnknownCRISocket from getInitConfigurati…
SataQiu Oct 17, 2023
fde7763
kubeadm: increase ut coverage for bootstraptoken/node
my-git9 Oct 15, 2023
2663ed1
Correct the label selector used in TestSampleAPIServer
tnqn Oct 17, 2023
33f2b82
Unregister group path from apiserver when the group no longer exists
tnqn Oct 17, 2023
ccf9669
add feature gates for authorization config
palnabarun Aug 24, 2023
8b9b69d
Add --authorization-config flag to apiserver
palnabarun Sep 25, 2023
41b7243
Add basic authz config integration test
liggitt Oct 17, 2023
570ed28
CHANGELOG: Update directory for v1.28.3 release
k8s-release-robot Oct 18, 2023
6ffe21f
CHANGELOG: Update directory for v1.27.7 release
k8s-release-robot Oct 18, 2023
34c4510
CHANGELOG: Update directory for v1.26.10 release
k8s-release-robot Oct 18, 2023
f37cd8b
CHANGELOG: Update directory for v1.25.15 release
k8s-release-robot Oct 18, 2023
80d991c
kubelet/userns: Add more unit tests
rata Aug 29, 2023
250d00b
update pretty param description
carlory Oct 16, 2023
75f4e91
Job: Replace deprecated wait functions with supported one
tenzen-y Oct 18, 2023
5587ebc
e2e: move AllNodesReady check to DeferCleanup
pohly Oct 11, 2023
25dfeb1
Revert "KEP 3085: check PodReadyToStartContainers condition after vol…
kannon92 Oct 18, 2023
305df48
k8s.io/kms: drop direct dependency on klog
enj Sep 29, 2023
ade8717
fix Huge Pages failing test
carlory Oct 16, 2023
145f820
kubelet: perform the admission checks that preemption will not help f…
SataQiu Mar 23, 2023
df97b88
add potential fixes for flakiness in eviction tests
kannon92 Sep 14, 2023
70ff5e9
kubelet/lifecycle handlers: refactor port resolver
PI-Victor Sep 20, 2023
b6157c2
Add --extra-peer in conversion in kube_codegen
thockin Oct 4, 2023
1d4c88f
Populate CRI filesystem info error
saschagrunert Oct 16, 2023
14cd77d
fix ImageLocality plugin score is inconsistent
olderTaoist Sep 13, 2023
36d6c9e
Remove GAed feature gates SeccompDefault
tukwila Oct 16, 2023
d4ae6be
Move grpc rate limitter from podresource folder
kl52752 Oct 6, 2023
a16e3e1
add CAP_NET_RAW to netadmin profile and remove privileged
mochizuki875 Jun 13, 2023
022462c
scheduler/nodeaffinity: reduce pod scheduling latency
carlory Jul 7, 2023
881077a
Fix issue in enabling evented pleg feature gate
sairameshv Oct 17, 2023
b1534a7
kubeadm: cleanup UnknownCRISocket from staticpods test
SataQiu Oct 19, 2023
e973388
kubeadm: skip CRI detection for 'kubeadm config validate'
SataQiu Oct 19, 2023
ca4bbec
kubeadm: remove unused DNSAddOnType from v1beta4 API
SataQiu Oct 19, 2023
ad10af5
ValidatingAdmissionPolicySpec: Variables omitempty.
jiahuif Oct 4, 2023
92a8abb
generated: UPDATE_COMPATIBILITY_FIXTURE_DATA
jiahuif Oct 5, 2023
d5fd165
fix: Use upper case `ALL` in drop capabilities
bodgit Oct 18, 2023
edec0c0
e2e: add more feature definitions
pohly Oct 19, 2023
c5b2843
Undeprecated kubelet cloud-provider flag
liggitt Oct 19, 2023
e7cc34f
e2e apimachinery: use feature gate
pohly Jul 5, 2023
56b4548
pin openapi
alexzielenski Oct 17, 2023
f0ae508
update generated code and openapi
alexzielenski Oct 18, 2023
7d860dc
use PollUntilContextTimeout to replace PollImmediateWithContext in test
bzsuni Oct 19, 2023
a6755b9
Use Patch instead of SSA for Pod Disruption condition
mimowo Oct 10, 2023
7e85bdb
add tcp_fin_timeout, tcp_keepalive_intvl and tcp_keepalive_probes to …
HirazawaUi Oct 15, 2023
9693ba4
update standard protocols to match KEP3726
dprotaso Oct 16, 2023
da6651f
update versioned types
dprotaso Oct 18, 2023
506a2a4
Promote KEP-2681 to beta in 1.29
wzshiming Sep 12, 2023
4af7e98
bump golang.org/grpc to v1.56.3
sxd Oct 19, 2023
eb7422b
kubeadm: add debug log for kubeProxyConfigFromCluster
SataQiu Oct 20, 2023
e0d4b55
e2e: stop using deprecated framework.ExpectNotEqual
Penguin-zlh Sep 4, 2023
fa557c1
storage/etcd3/metrics: add unit test for apiserver_storage_objects
machine424 Sep 22, 2023
53924e2
DRA: e2e: test non-graceful node shutdown
bart0sh Sep 25, 2023
9c5fe8e
Fixing CurrentReplicas and CurrentRevision in completeRollingUpdate
adilGhaffarDev Sep 18, 2023
70b9adb
e2e framework: allow random ordering of tags and text, fix some funct…
pohly Oct 17, 2023
34fed07
convert pointer to ptr for sig-apps integration tests
kannon92 Sep 30, 2023
9b55152
locking feature-gate for ready pods job status
Oct 17, 2023
0909aee
Forbid creating CronJob with TZ or CRON_TZ, but allow updates
soltysh Mar 3, 2023
1699c0e
feature(scheduler): simplify QueueingHint by introducing new statuses
sanposhiho Oct 19, 2023
e7e2259
fix based on reviews
sanposhiho Oct 20, 2023
6c4e3a0
e2e test for checking ready of job status
Oct 17, 2023
93e8a97
eviction manager: add test case with localStorageCapacityIsolation open
charles-chenzz Aug 26, 2023
b2c4b23
Introduce the job_finished_indexes_total metric
mimowo Oct 17, 2023
105db58
kubelet/sysctl: update log level
cyclinder Oct 13, 2023
c95c82c
registry/core: wire NotFound getter instead of nil
sttts Oct 19, 2023
79f907b
kubeadm coredns use drop ALL instead of all
pacoxu Oct 20, 2023
ccb0a6e
update suspend test to match other test cases
kannon92 Oct 6, 2023
003a228
KEP-3895: Promote interactive delete to beta
ardaguclu Sep 5, 2023
52316c6
cleanup: check unstructured for Validate(Update) before validating
alexzielenski Oct 18, 2023
b371bf2
cleanup: remove unused versions of cel validators and structural sche…
alexzielenski Oct 18, 2023
20db533
cleanup: move unstructured check earlier in status update
alexzielenski Oct 18, 2023
10fe7fe
fix typo
alexzielenski Oct 19, 2023
5bfb713
node: sample-dp: register by default and re-register on restarts
swatisehgal Jun 7, 2023
92422e8
node: sample-dp: Handle re-registration for controlled registrations
swatisehgal Jun 12, 2023
8881b3f
node: sample-dp: stubRegisterControlFunc for controlling registration
swatisehgal Jun 20, 2023
166e353
node: sample-dp: set default value for `pluginSocksDir`
swatisehgal Jun 20, 2023
33e25f8
node: sample-dp: Use fsnotify for kubelet restart detection
swatisehgal Jul 13, 2023
350cf69
node: sample-dp: Add retry to handle device plugin restart failure
swatisehgal Sep 22, 2023
427275e
KEP-3638: Promote plugin resolution to beta (#120663)
ardaguclu Oct 23, 2023
919edf6
client-go/reflector: introduce a data consistency mechanism for the w…
p0lyn0mial Oct 6, 2023
ae3e4c9
Allow using upper and lower case true|false when setting kubectl feat…
soltysh Oct 23, 2023
de4cd58
Restrict supported media types for new apiservers.
benluddy Oct 17, 2023
0b33627
Add validation for --storage-media-type option.
benluddy Oct 19, 2023
159af44
feature(scheduler): implement matchLabelKeys in PodAffinity and PodAn…
sanposhiho Feb 26, 2023
aeb5c82
calculate sidecar container resource in pod autoscaler
qingwave Aug 17, 2023
f72aa0c
fix test name
qingwave Aug 19, 2023
76a9877
configure npd to run as daemonset on cos
upodroid Oct 16, 2023
b8e557f
e2e: add [Environment:NotInUserNS] tag to sysctl tests
AkihiroSuda Oct 17, 2023
5ebc5fc
Graduate BackoffLimitPerIndex to Beta
mimowo Oct 19, 2023
a81efe7
Update staging/src/k8s.io/api/batch/v1/types.go
mimowo Oct 19, 2023
32e117b
cleanup: remove useless test
sanposhiho Oct 22, 2023
0df9737
reducae function calling to once
lowang-bh Aug 20, 2023
04de973
dra: refactoring overall flow of prepare/unprepare resources
TommyStarK Aug 22, 2023
d4a9e6d
[KMSv2] Drop the apimachinery
pegasas Oct 23, 2023
049921c
Revert "Promote KEP-2681 to beta in 1.29"
aojea Oct 23, 2023
c7bc6c8
dra scheduler: fall back to SSA for PodSchedulingContext updates
pohly Sep 6, 2023
7f1e84f
Fix: do not assign an empty value to the resource (CPU or memory) if …
aheng-ch Apr 26, 2023
6fed99c
tests: fixes flake in TestEncryptionConfigHotReload
nilekhc Oct 23, 2023
074cb35
ratcheting: ratchet CEL expressions for no-op updates
alexzielenski Oct 6, 2023
92dee7d
WIP: don't exclude .git from rsync
BenTheElder May 5, 2023
c60e860
cleanup: omit comparison with bool constants
ty-dc Sep 4, 2023
bace36f
Graduate ReadWriteOncePod to GA
chrishenzie Oct 11, 2023
f1cbd46
Update npd version to 0.8.13 in configure.sh
bzsuni Oct 20, 2023
251da36
e2e storage: remove dot at end of ginkgo.It text
pohly Oct 19, 2023
7353899
e2e storage: use framework to tag tests
pohly Jun 20, 2023
be670e0
Fix spelling
soltysh Oct 18, 2023
1445419
Modify mostRecentScheduleTime to return more detailed information abo…
soltysh Oct 18, 2023
199ad95
Add more test cases ensuring nextScheduleTimeDuration is never < 0
soltysh Oct 23, 2023
cd1af5c
controller: fix the help information format of sorting_deletion_age_r…
SataQiu Jun 1, 2023
c0f9f0e
chore: slice replace loop
testwill Jun 5, 2023
0a3aa7b
Fix tracking of terminating Pods when nothing else changes (#121342)
dejanzele Oct 24, 2023
7e54b0e
StreamTranslator and FallbackExecutor for WebSockets
seans3 Jul 7, 2023
e6ded6c
Add endpoint to skip topology aware log when missing zone hint
SteveProXNA Jan 5, 2023
4980051
Remove disablePaging param
wojtek-t Oct 20, 2023
658ed94
Remove storageConfig.Paging parameter
wojtek-t Oct 20, 2023
591e8df
Cleanup paging parameters in etcd3 store
wojtek-t Oct 20, 2023
b62cae7
Indicate Job Backoff Limit Per Index reason consts are beta
mimowo Oct 24, 2023
66e16fe
add container filesystem to CRI api
kannon92 Sep 27, 2023
eae550f
Add stability tests for CEL cost estimation.
cici37 Oct 23, 2023
8c7cc62
feat: add job_pods_creation_total metric
dejanzele Oct 24, 2023
a6fa030
revert changes to TestMetricsOnSuccesses for job pods creation total …
dejanzele Oct 24, 2023
690653c
add integration tests
kannon92 Aug 11, 2023
bf9b430
Add unit tests for subdomain match in keyring
saschagrunert Aug 15, 2023
f697275
Bumped the fsnotify from version v1.6.0 to v1.7.0
bzsuni Oct 23, 2023
3ae399e
kubeadm: skip CRI detection for 'kubeadm upgrade diff'
SataQiu Oct 24, 2023
8a836eb
cleanup UnknownCRISocket for unit tests
SataQiu Oct 24, 2023
10fdbbc
use the latest semver version for the badge
dims Oct 24, 2023
1887aa4
Remove unnecessary GetIndexer
kerthcet Oct 24, 2023
6f70db1
Fix unit test
wzshiming Oct 24, 2023
ccbe40b
remove data race on the devicemanager client plugin
aojea Oct 24, 2023
47bca28
revert: reverts fixes for TestEncryptionConfigHotReload flake
nilekhc Oct 25, 2023
e8e34ee
test: fixes hot reload flake
nilekhc Oct 25, 2023
5ba8dbd
Add volume plugin label to SELinux metrics
jsafrane Oct 4, 2023
4c9c4ae
Fix typos in markdown
calvinballing Oct 13, 2023
6e2fec6
Add e2e test for backoffLimitPerIndex
mimowo Oct 19, 2023
3208331
Move SELinux warning metric to be counted once per pod
jsafrane Oct 12, 2023
b8f4bd8
Fix SELinux unit tests
jsafrane Oct 12, 2023
7e8e4a5
Remove independent tests for metrics
alculquicondor Oct 20, 2023
4bfdb3a
Use a wider-range of metric buckets for PodStartDuration
ruiwen-zhao Sep 14, 2023
1f2681c
cleanup: rename failedPlugin to plugin in framework.Status
sanposhiho Oct 25, 2023
9348bb6
kube-proxy: Optionally do privileged configs only
uablrek Sep 25, 2023
c55bc68
[KMSv2] Add tracing
aramase Oct 9, 2023
c5c6395
kubelet/images: refactor freeImage and imagesInEvictionOrder
haircommander Oct 6, 2023
958898a
kubelet/images: refactor image gc unit tests
haircommander Oct 6, 2023
58566f5
kubelet: add and use ImageMaximumGCAge in KubeletConfiguration
haircommander Oct 6, 2023
0b3c3a0
kubelet config validation: add validation for image max gc age
haircommander Oct 20, 2023
074acfb
kubelet/images: add and use freeOldImages function
haircommander Oct 6, 2023
cdd5b21
kubelet/images: add unit test for MaxAge
haircommander Oct 6, 2023
77e2d05
metrics: add and use ImageGarbageCollectedTotal
haircommander Oct 6, 2023
194163f
kubeadm: fix export comments to make golangci-lint happy
neolit123 Oct 25, 2023
e5f98b9
add variadic options to ValidateUpdate
alexzielenski Oct 23, 2023
7953e63
fix usage
alexzielenski Oct 24, 2023
2044539
fetch a shared correlated object off the validation options if it exists
alexzielenski Oct 23, 2023
1c903c7
ratcheting: provide a shared correlated object
alexzielenski Oct 23, 2023
4a5df7d
replace CEL ValidateWithRatcheting with variadic options
alexzielenski Oct 24, 2023
f78ec33
allow empty object to be CEL value.
jiahuif Oct 23, 2023
40a8416
integration test for empty & unstructured.
jiahuif Oct 23, 2023
7ba6145
verify-golangci-lint.sh: support arbitrary GOBIN
pohly Oct 25, 2023
6d0838f
Add metric for e2e pod startup latency including image pull
ruiwen-zhao Oct 24, 2023
df4e660
Rewrite ipvs/iptables tests that manually construct BaseEndpointInfo
danwinship Jun 17, 2023
83e28ce
Clean up Endpoint / BaseEndpointInfo a bit
danwinship Sep 26, 2023
aec5886
Unexport BaseEndpointInfo fields, fix getter names
danwinship Jun 17, 2023
44461e7
Remove GA featuregate about CSIMigrationvSphere in 1.29
bzsuni Oct 17, 2023
29bf1e2
kubeapiserver/options: fix cloud provider validation
sttts Oct 17, 2023
6eb6b83
Add CDI support to the sample device plugin
bart0sh Jul 13, 2023
395bc38
e2e_node: implement DevicePluginCDIDevices test case
bart0sh Oct 23, 2023
20cd8d6
Do not preallocate node for Job e2e tests to fix flakes
mimowo Oct 24, 2023
519b082
Remove problematic Dbus restart test
kwilczynski Oct 25, 2023
2d704e1
Add PodHostIPs test
wzshiming Oct 24, 2023
32406f6
Update security contacts for sig-cli
soltysh Oct 25, 2023
5791717
Use tracing semconv types instead of own defines
saschagrunert Aug 11, 2023
0fa2b12
node: e2e: topology-mgr: Determine threads per core
swatisehgal Oct 23, 2023
5c6c83a
node: e2e: topology-mgr: Disambiguage cores from cpus
swatisehgal Oct 23, 2023
67f1b86
Remove unnecessary type conversion
sourcelliu Apr 21, 2023
30c42d7
Improve the performance of isPodStatusCacheTerminal
sourcelliu Apr 22, 2023
3982708
chore: loop optimization
testwill Jun 3, 2023
4cc99a0
Drop usage of deprecated method NewNamedRateLimitingQueue
dims Oct 17, 2023
3264989
working-config-otel
dims Oct 18, 2023
9c70585
DRA: call plugins for claims even if exist in cache
adrianchiris Sep 10, 2023
8501fd0
Add unit tests
adrianchiris Oct 9, 2023
37e2a3d
chore: omit comparison to bool constant
testwill Jun 29, 2023
19f3560
Graduate DevicePluginCDIDevices to Beta
bart0sh Oct 16, 2023
0affd4b
Remove GAed feature gates OpenAPIV3
tukwila Oct 19, 2023
979803c
cluster/gce: set KUBE_WATCHLIST_INCONSISTENCY_DETECTOR when requested…
p0lyn0mial Oct 23, 2023
b05b6d3
Improve performance of method PodRequests
sourcelliu Mar 12, 2023
1ba594d
Improve the performance of schedulinggates
sourcelliu May 4, 2023
6908c28
Add back k8s.io/kms/internal/plugins/_mock/go.*
dims Oct 26, 2023
c432b8d
Delete binary file
liggitt Oct 26, 2023
e12db66
Prevent sampledeviceplugin binary commit
liggitt Oct 26, 2023
b2dd780
Fix systemd unit string matchs
rothgar Sep 14, 2023
0291540
Add service name tests
rothgar Oct 10, 2023
b9f4717
Use k8s.io/utils/ptr in pkg/proxy (#121154)
danwinship Oct 26, 2023
4641205
Promote PV/PVC status e2e test to Conformance
heyste Oct 16, 2023
20bb2e5
remove pc pvc status endpoints
Oct 16, 2023
3841df3
don't run these tests on aws
upodroid Oct 26, 2023
bf17924
[KMSv2] promote KMSv2 and KMSv2KDF to GA
ritazh Oct 24, 2023
88a0b0b
cloud-node-lifecycle controller: add fallback for empty providerID in…
mkowalski Sep 12, 2023
ee4c201
gce: fix test for non-existing instance in cloud
mkowalski Oct 26, 2023
61ecf38
kubeadm: make super-admin.conf changes in app/constants
neolit123 Oct 16, 2023
60faf31
kubeadm: make super-admin.conf changes in app/phases
neolit123 Oct 19, 2023
061d6f9
kubeadm: make super-admin.conf changes to app/cmd
neolit123 Oct 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// For format details, see https:https://containers.dev/implementors/spec/. For config options, see the README at:
// https://github.com/devcontainers/images/tree/main/src/base-debian
{
"name": "Kubernetes with e2e testing image build and push",
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
// Setup the go environment and mount into the dev container at the expected location
"hostRequirements": {
"cpus": 4
},
// Copy over welcome message and install pyyaml
"onCreateCommand": "bash .devcontainer/setup.sh",
// for Kubernetes testing, suppress extraneous forwarding messages
"otherPortsAttributes": {
"onAutoForward": "silent"
},
"remoteUser": "root",
// Install utils, go, docker-in-docker, and other tools
// For more info about dev container Features see https://containers.dev/features
"features": {
"ghcr.io/devcontainers/features/go:1": {
"version": "1.21.1",
"username": "root"
},
// Install kubectl, but skip minikube and helm
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
"version": "latest",
"helm": "none",
"minikube": "none"
},
// Enable running docker in docker
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/sshd:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
// Python required for some hack tools
"ghcr.io/devcontainers/features/python:1": {},
// TO DO - move these features from local to their projects, and publish them
"./local-features/kubectl-kind": {},
"./local-features/etcd": {},
"./local-features/kubetest2": {}
}
}
21 changes: 21 additions & 0 deletions .devcontainer/local-features/etcd/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"id": "etcd",
"name": "ETCD",
"descrption": "Operating etcd clusters for Kubernetes",
"options": {
"version": {
"type": "string",
"proposals": [
"latest"
],
"default": "latest",
"description": "Select or enter a version."
}
},
"containerEnv": {
"PATH": "/usr/local/etcd:${PATH}"
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
92 changes: 92 additions & 0 deletions .devcontainer/local-features/etcd/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/usr/bin/env bash
# Copyright 2022 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Only supports Linux

set -eux

ETCD_VERSION="${VERSION:-"latest"}"

# Figure out correct version of a three part version number is not passed
find_version_from_git_tags() {
local variable_name=$1
local requested_version=${!variable_name}
if [ "${requested_version}" = "none" ]; then return; fi
local repository=$2
local prefix=${3:-"tags/v"}
local separator=${4:-"."}
local last_part_optional=${5:-"false"}
if [ "$(echo "${requested_version}" | grep -o "." | wc -l)" != "2" ]; then
local escaped_separator=${separator//./\\.}
local last_part
if [ "${last_part_optional}" = "true" ]; then
last_part="(${escaped_separator}[0-9]+)?"
else
last_part="${escaped_separator}[0-9]+"
fi
local regex="${prefix}\\K[0-9]+${escaped_separator}[0-9]+${last_part}$"
# shellcheck disable=SC2155
local version_list="$(git ls-remote --tags "${repository}" | grep -oP "${regex}" | tr -d ' ' | tr "${separator}" "." | sort -rV)"
if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ] || [ "${requested_version}" = "lts" ]; then
# shellcheck disable=SC2086
declare -g ${variable_name}="$(echo "${version_list}" | head -n 1)"
else
set +e
# shellcheck disable=SC2086
declare -g ${variable_name}="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")"
set -e
fi
fi
if [ -z "${!variable_name}" ] || ! echo "${version_list}" | grep "^${!variable_name//./\\.}$" > /dev/null 2>&1; then
echo -e "Invalid ${variable_name} value: ${requested_version}\nValid values:\n${version_list}" >&2
exit 1
fi
# shellcheck disable=SC1079
echo "${variable_name}=${!variable_name}"
}

apt-get update
apt-get -y install --no-install-recommends curl tar

# Get closest match for version number specified
find_version_from_git_tags ETCD_VERSION "https://github.com/etcd-io/etcd"

# Installs etcd in ./third_party/etcd
echo "Installing etcd ${ETCD_VERSION}..."

architecture="$(uname -m)"
case "${architecture}" in
"x86_64") architecture="amd64"
;;
"aarch64" | "armv8*") architecture="arm64"
;;
*) echo "(!) Architecture ${architecture} unsupported";
exit 1
;;
esac

# shellcheck disable=SC1079
FILE_NAME="etcd-v${ETCD_VERSION}-linux-${architecture}.tar.gz"
curl -sSL -o "${FILE_NAME}" "https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${FILE_NAME}"
tar xzf "${FILE_NAME}"

# shellcheck disable=SC1073
mv "etcd-v${ETCD_VERSION}-linux-amd64" /usr/local/etcd
rm -rf "${FILE_NAME}"

# Installs etcd in /usr/bin so we don't have to futz with the path.
install -m755 /usr/local/etcd/etcd /usr/local/bin/etcd
install -m755 /usr/local/etcd/etcdctl /usr/local/bin/etcdctl
install -m755 /usr/local/etcd/etcdutl /usr/local/bin/etcdutl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "kubectl-kind",
"name": "Kubectl kind",
"description": "Installs kind - a tool for running local Kubernetes clusters using Docker container 'nodes'",
"options": {
"version": {
"type": "string",
"proposals": [
"latest"
],
"default": "latest",
"description": "Select or enter a version."
}
},
"installsAfter": [
"ghcr.io/devcontainers/features/go"
]
}
72 changes: 72 additions & 0 deletions .devcontainer/local-features/kubectl-kind/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env bash
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# only supports Linux

set -eux

KIND_VERSION="${VERSION:-"latest"}"

# Figure out correct version of a three part version number is not passed
find_version_from_git_tags() {
local variable_name=$1
local requested_version=${!variable_name}
if [ "${requested_version}" = "none" ]; then return; fi
local repository=$2
local prefix=${3:-"tags/v"}
local separator=${4:-"."}
local last_part_optional=${5:-"false"}
if [ "$(echo "${requested_version}" | grep -o "." | wc -l)" != "2" ]; then
local escaped_separator=${separator//./\\.}
local last_part
if [ "${last_part_optional}" = "true" ]; then
last_part="(${escaped_separator}[0-9]+)?"
else
last_part="${escaped_separator}[0-9]+"
fi
local regex="${prefix}\\K[0-9]+${escaped_separator}[0-9]+${last_part}$"
# shellcheck disable=SC2155
local version_list="$(git ls-remote --tags "${repository}" | grep -oP "${regex}" | tr -d ' ' | tr "${separator}" "." | sort -rV)"
if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ] || [ "${requested_version}" = "lts" ]; then
# shellcheck disable=SC2086
declare -g ${variable_name}="$(echo "${version_list}" | head -n 1)"
else
set +e
# shellcheck disable=SC2086
declare -g ${variable_name}="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")"
set -e
fi
fi
if [ -z "${!variable_name}" ] || ! echo "${version_list}" | grep "^${!variable_name//./\\.}$" > /dev/null 2>&1; then
echo -e "Invalid ${variable_name} value: ${requested_version}\nValid values:\n${version_list}" >&2
exit 1
fi
echo "${variable_name}=${!variable_name}"
}

# Clean up
rm -rf /var/lib/apt/lists/*

# Get closest match for version number specified
find_version_from_git_tags KIND_VERSION "https://github.com/kubernetes-sigs/kind"

echo "Installing kind ${KIND_VERSION}..."

# Install kind
go install sigs.k8s.io/kind@v"${KIND_VERSION}"

chown -R "${_REMOTE_USER}:golang" "${GOPATH}"
chmod -R g+r+w "${GOPATH}"
find "${GOPATH}" -type d -print0 | xargs -n 1 -0 chmod g+s
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "kubetest2",
"name": "Kubetest2",
"description": "Kubetest2 a framework for deploying Kubernetes clusters and running end to end tests",
"installsAfter": [
"ghcr.io/devcontainers/features/go"
]
}
35 changes: 35 additions & 0 deletions .devcontainer/local-features/kubetest2/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# only supports Linux

set -eux

# Clean up
rm -rf /var/lib/apt/lists/*

echo "Installing kubetest2..."
go install sigs.k8s.io/kubetest2/...@latest

apt-get update
apt-get -y install --no-install-recommends curl apt-transport-https ca-certificates gnupg
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo tee /usr/share/keyrings/cloud.google.gpg
apt-get update && apt-get install google-cloud-cli

chown -R "${_REMOTE_USER}:golang" "${GOPATH}"
chmod -R g+r+w "${GOPATH}"
find "${GOPATH}" -type d -print0 | xargs -n 1 -0 chmod g+s
30 changes: 30 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

# Copyright 2023 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eux

cd "$(dirname "$0")"
cd ../

# Install pyyaml as required by verify.publishing-bot
python3 -m pip install --user --upgrade --no-cache-dir pyyaml

# Copies over welcome message
cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt

git remote add upstream https://github.com/kubernetes/kubernetes.git || true
# Never push to upstream master
git remote set-url --push upstream no_push
20 changes: 20 additions & 0 deletions .devcontainer/welcome-message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
👋 Welcome to Kubernetes contribution in a dev container!
Works in GitHub Codespaces, VS Code, or in docker using the devcontainer cli

See https://www.kubernetes.dev/docs/onboarding/ for guidance on contributing to Kuberentes

This debian dev container image satisfies https://github.com/kubernetes/community/blob/master/contributors/devel/development.md and includes:
- kubernetes/kubernetes repository
- Docker
- go
- kubectl, etcd, kubetest2, and kind
For details about dev containers and the debian dev container base image see https://containers.dev and https://github.com/devcontainers/images/tree/main/src/base-debian.
The configuration for the dev container is in the .github/.devcontainer folder. (will be moved to prow)
🎵 By default in Codespaces this environment uses a 4-core machine. Some tests may require a larger machine. In Codespaces you can change the machine type.
See https://docs.github.com/en/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace

⚙️ If you are working in Codespaces on your own fork, this environment is automatically configured to support the GitHub
workflow https://www.kubernetes.dev/docs/guide/github-workflow/ (omit the clone step)
↪️ Otherwise Codespaces will automatically fork the repository for you when you make your first push

🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).