Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit 00d69ef

Browse files
generate the manifests by calling the kubeadm
1 parent 864d0db commit 00d69ef

21 files changed

+824
-535
lines changed

Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
4545
--mount=type=cache,target=/go/pkg/mod \
4646
--mount=type=cache,target=/root/.local/share/golang \
4747
CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -ldflags "${LDFLAGS} -extldflags '-static'" -o manager ${package}
48+
RUN curl -L https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubeadm -o kubeadm && chmod +x kubeadm
4849
ENTRYPOINT [ "/start.sh", "/workspace/manager" ]
4950

5051
# Use distroless as minimal base image to package the manager binary
5152
# Refer to https://github.com/GoogleContainerTools/distroless for more details
52-
FROM gcr.io/distroless/static:nonroot
53+
FROM gcr.io/distroless/static-debian10
5354
# Copy the controller-manager into a thin image
5455
WORKDIR /
5556
COPY --from=builder /workspace/manager .
56-
COPY controlplane/nested/component-templates/ ./component-templates/
57-
USER 65532:65532
57+
COPY --from=builder /workspace/kubeadm kubeadm
58+
# USER 65532:65532
5859
ENTRYPOINT ["/manager"]

config/crd/kustomization.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ commonLabels:
2424
# capi system can cross reference the proper controlplane & infra refs
2525
# https://cluster-api.sigs.k8s.io/developer/providers/v1alpha2-to-v1alpha3.html#apply-the-contract-version-label-clusterx-k8sioversion-version1_version2_version3-to-your-crds
2626
cluster.x-k8s.io/v1alpha3: v1alpha4
27-
cluster.x-k8s.io/v1alpha4: v1alpha4
27+
cluster.x-k8s.io/v1alpha4: v1alpha4
28+
cluster.x-k8s.io/v1beta1: v1alpha4

config/rbac/role.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,14 @@ rules:
4848
- get
4949
- patch
5050
- update
51+
- apiGroups:
52+
- ""
53+
resources:
54+
- configmaps
55+
verbs:
56+
- get
57+
- patch
58+
- update
59+
- list
60+
- create
61+
- delete

config/samples/v1alpha4_cluster.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ spec:
1919
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
2020
kind: NestedCluster
2121
name: nestedcluster-sample
22-
namespace: default
22+
namespace: default

controlplane/nested/component-templates/nested-apiserver/nested-apiserver-service-template.yaml

-16
This file was deleted.

controlplane/nested/component-templates/nested-apiserver/nested-apiserver-statefulset-template.yaml

-149
This file was deleted.

controlplane/nested/component-templates/nested-controllermanager/nested-controllermanager-statefulset-template.yaml

-91
This file was deleted.

controlplane/nested/component-templates/nested-etcd/nested-etcd-service-template.yaml

-12
This file was deleted.

0 commit comments

Comments
 (0)