forked from openshift/cluster-api-provider-openstack
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v1alpha2 Migration] add v1alpha2 controllers (kubernetes-sigs#446)
* migrate types & controllers to v1alpha2 * fix kubelet version
- Loading branch information
1 parent
a281714
commit 2da2c2f
Showing
1,797 changed files
with
77,261 additions
and
119,191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,71 @@ | ||
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder | ||
WORKDIR /go/src/sigs.k8s.io/cluster-api-provider-openstack | ||
COPY . . | ||
RUN go build -o ./machine-controller-manager ./cmd/manager | ||
RUN go build -o ./manager ./vendor/sigs.k8s.io/cluster-api/cmd/manager | ||
|
||
FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base | ||
RUN INSTALL_PKGS=" \ | ||
openssh \ | ||
" && \ | ||
yum install -y $INSTALL_PKGS && \ | ||
rpm -V $INSTALL_PKGS && \ | ||
yum clean all | ||
COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-openstack/manager / | ||
COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-openstack/machine-controller-manager / | ||
# Copyright 2019 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.12.7 as builder | ||
# | ||
## Copy in the go src | ||
#WORKDIR ${GOPATH}/src/sigs.k8s.io/cluster-api-provider-openstack | ||
#COPY pkg/ pkg/ | ||
#COPY cmd/ cmd/ | ||
#COPY vendor/ vendor/ | ||
#COPY api/ api/ | ||
#COPY controllers/ controllers/ | ||
#COPY main.go main.go | ||
#COPY go.mod go.mod | ||
#COPY go.sum go.sum | ||
# | ||
## Build | ||
#RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on GOFLAGS="-mod=vendor" \ | ||
# go build -a -ldflags '-extldflags "-static"' \ | ||
# -o manager sigs.k8s.io/cluster-api-provider-openstack | ||
# | ||
## Copy the controller-manager into a thin image | ||
#FROM gcr.io/distroless/static:latest | ||
#WORKDIR / | ||
#COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-openstack/manager . | ||
#USER nobody | ||
#ENTRYPOINT ["/manager"] | ||
|
||
# Build the manager binary | ||
FROM golang:1.12.7 | ||
|
||
# default the go proxy | ||
ARG goproxy=https://proxy.golang.org | ||
|
||
# run this with docker build --build_arg $(go env GOPROXY) to override the goproxy | ||
ENV GOPROXY=$goproxy | ||
|
||
WORKDIR /workspace | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY main.go main.go | ||
COPY api/ api/ | ||
COPY controllers/ controllers/ | ||
COPY pkg/ pkg/ | ||
|
||
# Allow containerd to restart pods by calling /restart.sh (mostly for tilt + fast dev cycles) | ||
# TODO: Remove this on prod and use a multi-stage build | ||
COPY third_party/forked/rerun-process-wrapper/start.sh . | ||
COPY third_party/forked/rerun-process-wrapper/restart.sh . | ||
|
||
# Build and run | ||
RUN go install -v . | ||
RUN mv /go/bin/cluster-api-provider-openstack /manager | ||
ENTRYPOINT ["./start.sh", "/manager"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
version: "1" | ||
domain: k8s.io | ||
version: "2" | ||
domain: cluster.x-k8s.io | ||
repo: sigs.k8s.io/cluster-api-provider-openstack | ||
resources: | ||
- group: infrastructure | ||
version: v1alpha2 | ||
kind: OpenStackCluster | ||
- group: infrastructure | ||
version: v1alpha2 | ||
kind: OpenStackMachine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Copyright 2019 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. | ||
*/ | ||
|
||
// Package v1alpha2 contains API Schema definitions for the infrastructure v1alpha2 API group | ||
// +kubebuilder:object:generate=true | ||
// +groupName=infrastructure.cluster.x-k8s.io | ||
package v1alpha2 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
"sigs.k8s.io/controller-runtime/pkg/scheme" | ||
) | ||
|
||
var ( | ||
// GroupVersion is group version used to register these objects | ||
GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha2"} | ||
|
||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme | ||
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} | ||
|
||
// AddToScheme adds the types in this group-version to the given scheme. | ||
AddToScheme = SchemeBuilder.AddToScheme | ||
) |
Oops, something went wrong.