Skip to content

Commit 9da1a1b

Browse files
committed
CAPD: drop kubectl from image
Signed-off-by: Stefan Büringer [email protected]
1 parent d21addf commit 9da1a1b

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

Tiltfile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,6 @@ providers = {
111111
"third_party",
112112
],
113113
"label": "CAPD",
114-
# Add kubectl to the docker image, CAPD manager requires it.
115-
"additional_docker_helper_commands": "RUN curl -LO https://dl.k8s.io/release/{KUBE}/bin/linux/{ARCH}/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/bin/kubectl".format(
116-
ARCH = os_arch,
117-
KUBE = kubernetes_version,
118-
),
119-
"additional_docker_build_commands": """
120-
COPY --from=tilt-helper /usr/bin/kubectl /usr/bin/kubectl
121-
""",
122114
},
123115
"test-extension": {
124116
"context": "test/extension", # NOTE: this should be kept in sync with corresponding setting in tilt-prepare

test/infrastructure/docker/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
# Build the manager binary
1718
# Run this with docker build --build-arg builder_image=<golang:x.y.z>
1819
ARG builder_image
1920

@@ -33,10 +34,6 @@ ENV GOPROXY=$goproxy
3334
# Gets additional CAPD dependencies
3435
WORKDIR /tmp
3536

36-
RUN curl -LO "https://dl.k8s.io/release/v1.26.0/bin/linux/${ARCH}/kubectl" && \
37-
chmod +x ./kubectl && \
38-
mv ./kubectl /usr/bin/kubectl
39-
4037
WORKDIR /workspace
4138
COPY go.mod go.mod
4239
COPY go.sum go.sum
@@ -77,6 +74,5 @@ FROM gcr.io/distroless/static:latest-${ARCH}
7774

7875
WORKDIR /
7976
COPY --from=builder /workspace/manager .
80-
COPY --from=builder /usr/bin/kubectl /usr/bin/kubectl
8177

8278
ENTRYPOINT ["/manager"]

0 commit comments

Comments
 (0)