Skip to content

Commit

Permalink
Migrate to CRDs, Kubebuilder and Kustomize (#126)
Browse files Browse the repository at this point in the history
* Remove cluster/machine actuators

* Update Gopkg files

* Sync vendor directory

* Sync boilerplate

* Update Makefile to use go generate

* Delete old ProviderConfig types

* Add new ProviderConfig types based on CRDs

* Remove leftovers from Cluster and Machine Controllers

* Refactor ClusterActuator to utilize CRDs

* Refactor MachineActuator to utilize CRDs

* Refactor clusterctl to use new controller/manager

* Add AddToManager functions

* Implement Manager

* Add Dockerfile for the Manager binary

* Update example scripts to be compatible with Kustomize

* Update Makefile to be compatible with Kubebuilder

* Add Kustomize support

* HACK: disable kubeadm token generation

* Refactor Makefile to make it compatible with old one

* Update gometalinter.json

* Update license headers

* Update documentation to reflect CRDs changes

* Remove outdated TODO markers

* FIX: fix kubeadm token generation

* TYPO: fix typo in README

* FIX: InstanceStatus is correctly updated

* Update scripts to use new Docker repository

* Update Makefile to automatically update Manager manifest with correct image

* Set correct image tag in the manifest
  • Loading branch information
xmudrii authored and k8s-ci-robot committed Feb 6, 2019
1 parent ac31413 commit a5b4cce
Show file tree
Hide file tree
Showing 7,330 changed files with 1,904,129 additions and 261,880 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2018 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.

# Build the manager binary
FROM golang:1.10.3 as builder

# Copy in the go src
WORKDIR /go/src/sigs.k8s.io/cluster-api-provider-digitalocean
COPY pkg/ pkg/
COPY cmd/ cmd/
COPY vendor/ vendor/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager sigs.k8s.io/cluster-api-provider-digitalocean/cmd/manager

FROM ubuntu:latest as kubeadm
RUN apt-get update
RUN apt-get install -y curl
RUN curl -fsSL https://dl.k8s.io/release/v1.11.2/bin/linux/amd64/kubeadm > /usr/bin/kubeadm
RUN chmod a+rx /usr/bin/kubeadm

# Copy the controller-manager into a thin image
FROM ubuntu:latest
WORKDIR /
COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-digitalocean/manager .
COPY --from=kubeadm /usr/bin/kubeadm /usr/bin/kubeadm
ENTRYPOINT ["/manager"]
Loading

0 comments on commit a5b4cce

Please sign in to comment.