@@ -77,9 +77,86 @@ not be addressed in this KEP; it will be the subject of its own KEP.
77
77
78
78
## Proposal
79
79
80
- Move ` k8s.io/kubernetes/pkg/kubectl ` to a location under
81
- ` k8s.io/kubernetes/staging/src/k8s.io/kubectl ` , and update all
82
- ` k8s.io/kubernetes/pkg/kubectl ` imports.
80
+ The following steps to create the staging repository have been copied from
81
+ the base [ staging directory README] ( https://github.com/kubernetes/kubernetes/tree/master/staging ) .
82
+
83
+ ### Adding the staging repository in kubernetes/kubernetes:
84
+
85
+ 1 . Send an email to the SIG Architecture mailing list and the mailing list of
86
+ the SIG CLI which would own the repo requesting approval for creating the
87
+ staging repository.
88
+
89
+ 2 . Once approval has been granted, create the new staging repository.
90
+
91
+ 3 . Add a symlink to the staging repo in vendor/k8s.io.
92
+
93
+ 4 . Update import-restrictions.yaml to add the list of other staging repos that
94
+ this new repo can import.
95
+
96
+ 5 . Add all mandatory template files to the staging repo as mentioned in
97
+ https://github.com/kubernetes/kubernetes-template-project .
98
+
99
+ 6 . Make sure that the .github/PULL_REQUEST_TEMPLATE.md and CONTRIBUTING.md files
100
+ mention that PRs are not directly accepted to the repo.
101
+
102
+ ### Modify and Set-up the existing receiving kubernetes/kubectl repository
103
+
104
+ Currently, there are three types of content in the current kubernetes/kubectl
105
+ repository that need to be dealt with. These items are 1) the [ Kubectl
106
+ Book] ( https://kubectl.docs.k8s.io/ ) , 2) an integration test framework, and 3)
107
+ some kubectl openapi code. Since we intend to copy the staging code into this
108
+ kubernetes/kubectl repository, and since this repository must be empty, we need
109
+ to dispose of these items. A copy of the kubectl openapi code already exists
110
+ under ` pkg/kubectl ` in the kubernetes/kubernetes repository, so it can be
111
+ deleted. The following steps describe how we intend to modify the existing
112
+ kubernetes/kubectl repository:
113
+
114
+ 1 . We will create a backup of the entire [ current
115
+ kubectl] ( https://github.com/kubernetes/kubectl ) repository in the [ Google
116
+ Cloud Source Repository] ( https://cloud.google.com/source-repositories/ ) .
117
+
118
+ 2 . The [ Kubectl Book] ( https://kubectl.docs.k8s.io/ ) should be in its own
119
+ repository. So we will create a new repository, and copy this content into
120
+ the new repository.
121
+
122
+ 3 . We will then clear the [ current
123
+ kubectl] ( https://github.com/kubernetes/kubectl ) repository.
124
+
125
+ 4 . Setup branch protection and enable access to the stage-bots team by adding
126
+ the repo in prow/config.yaml. See #kubernetes/test-infra#9292 for an
127
+ example.
128
+
129
+ 5 . Once the repository has been cleared, update the publishing-bot to publish
130
+ the staging repository by updating:
131
+
132
+ rules.yaml: Make sure that the list of dependencies reflects the staging
133
+ repos in the go modules.
134
+
135
+ fetch-all-latest-and-push.sh: Add the staging repo in the list of repos to be
136
+ published.
137
+
138
+ 6 . Add the staging and published repositories as a subproject for the SIG that
139
+ owns the repos in sigs.yaml.
140
+
141
+ 7 . Add the repo to the list of staging repos in this README.md file.
142
+
143
+ 8 . We will re-introduce the integration test framework into the kubectl
144
+ repository by submitting into the new staging directory.
145
+
146
+ ### Move ` pkg/kubectl ` Code
147
+
148
+ Move ` k8s.io/kubernetes/pkg/kubectl ` to a location under the new
149
+ ` k8s.io/kubernetes/staging/src/k8s.io/kubectl ` directory, and update all
150
+ ` k8s.io/kubernetes/pkg/kubectl ` imports. This can be an incremental process.
151
+
152
+ ### Timeframe
153
+
154
+ There are three remaining Kubernetes core dependencies that have to be resolved
155
+ before all of ` pkg/kubectl ` can be moved to staging. While we work on those
156
+ remaining dependencies, we can move some ` pkg/kubectl ` code to staging that is
157
+ currently being requested by other projects. Specifically, we will move
158
+ ` pkg/kubectl/cmd/apply ` into staging as soon as possible. The rest of the code
159
+ would be moved over the next two releases (1.16 and 1.17).
83
160
84
161
## Risks and Mitigations
85
162
0 commit comments