-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from dougbtv/certs-updates
Recent updates, includes installer methodology
- Loading branch information
Showing
13,123 changed files
with
61,361 additions
and
5,033,350 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ FROM openshift/origin-release:golang-1.10 as builder | |
# Add everything | ||
ENV PKG_NAME=github.com/K8sNetworkPlumbingWG/net-attach-def-admission-controller | ||
ENV PKG_PATH=/go/src/$PKG_NAME | ||
ENV GO111MODULE=off | ||
RUN mkdir -p $PKG_PATH | ||
|
||
COPY . $PKG_PATH/ | ||
|
@@ -15,11 +16,10 @@ WORKDIR / | |
|
||
FROM openshift/origin-base | ||
COPY --from=builder /go/src/github.com/K8sNetworkPlumbingWG/net-attach-def-admission-controller/bin/webhook /usr/bin/ | ||
COPY --from=builder /go/src/github.com/K8sNetworkPlumbingWG/net-attach-def-admission-controller/bin/installer /usr/bin/ | ||
|
||
LABEL io.k8s.display-name="Container Networking Plugins" \ | ||
io.k8s.description="This is a component of OpenShift Container Platform and provides an admission controller for Multus CNI custom resources." \ | ||
io.openshift.tags="openshift" \ | ||
maintainer="Doug Smith <[email protected]>" | ||
|
||
CMD ["webhook"] | ||
CMD ["/usr/bin/webhook"] |
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,30 +1,37 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
ORG_PATH="github.com/K8sNetworkPlumbingWG" | ||
REPO_PATH="${ORG_PATH}/net-attach-def-admission-controller" | ||
DEST_DIR="bin" | ||
|
||
if [ ! -h gopath/src/${REPO_PATH} ]; then | ||
mkdir -p gopath/src/${ORG_PATH} | ||
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 | ||
if [ ! -d ${DEST_DIR} ]; then | ||
mkdir ${DEST_DIR} | ||
fi | ||
|
||
cp -a vendor/* gopath/src/ | ||
# this if... will be removed when gomodules goes default | ||
if [ "$GO111MODULE" == "off" ]; then | ||
echo "Building admission controller without go module" | ||
echo "Warning: this will be deprecated in near future so please use go modules!" | ||
|
||
export GOBIN=${PWD}/bin | ||
export GOPATH=${PWD}/gopath | ||
ORG_PATH="github.com/K8sNetworkPlumbingWG" | ||
REPO_PATH="${ORG_PATH}/net-attach-def-admission-controller" | ||
|
||
echo "Building admission controller" | ||
# go install ${REPO_PATH}/... | ||
mkdir -p bin | ||
workdir=$(pwd) | ||
cd gopath/src/${REPO_PATH} | ||
# go install ./... | ||
go build -o ./bin/installer ${REPO_PATH}/cmd/installer | ||
go build -o ./bin/webhook ${REPO_PATH}/cmd/webhook | ||
chmod +x ./bin/installer | ||
chmod +x ./bin/webhook | ||
cd $workdir | ||
# go install ./... | ||
if [ ! -h gopath/src/${REPO_PATH} ]; then | ||
mkdir -p gopath/src/${ORG_PATH} | ||
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 | ||
fi | ||
|
||
#cp -a vendor/* gopath/src/ | ||
export GO15VENDOREXPERIMENT=1 | ||
export GOBIN=${PWD}/bin | ||
export GOPATH=${PWD}/gopath | ||
|
||
# go install ./... | ||
go build -o ./bin/webhook ${REPO_PATH}/cmd/webhook | ||
else | ||
# build with go modules | ||
export GO111MODULE=on | ||
|
||
echo "Building admission controller" | ||
go build -o ${DEST_DIR}/webhook -tags no_openssl -ldflags "${LDFLAGS}" "$@" ./cmd/webhook | ||
fi | ||
# go install ./... |
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 was deleted.
Oops, something went wrong.
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,49 @@ | ||
# Copyright (c) 2018 Intel Corporation | ||
# | ||
# 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. | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: net-attach-def-admission-controller-server | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: net-attach-def-admission-controller | ||
template: | ||
metadata: | ||
labels: | ||
app: net-attach-def-admission-controller | ||
spec: | ||
containers: | ||
- name: net-attach-def-admission-controller | ||
image: nfvpe/net-attach-def-admission-controller:snapshot | ||
command: | ||
- webhook | ||
args: | ||
- -bind-address=0.0.0.0 | ||
- -port=443 | ||
- -tls-private-key-file=/etc/webhook/key.pem | ||
- -tls-cert-file=/etc/webhook/cert.pem | ||
- -alsologtostderr=true | ||
volumeMounts: | ||
- name: webhook-certs | ||
mountPath: /etc/webhook | ||
readOnly: True | ||
imagePullPolicy: Always | ||
#imagePullPolicy: IfNotPresent | ||
volumes: | ||
- name: webhook-certs | ||
secret: | ||
secretName: net-attach-def-admission-controller-secret |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.