Skip to content

Commit

Permalink
Upgraded the operator-sdk version to 0.8.1
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling committed Jun 3, 2019
1 parent 990318d commit 359e0a8
Show file tree
Hide file tree
Showing 14 changed files with 260 additions and 72 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
build/_output
build/_test
deploy/test
vendor

# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
### Emacs ###
# -*- mode: gitignore; -*-
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
dist: xenial

go:
- 1.11.1
- 1.12.5

stages:
- name: build
Expand Down
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
GO_FLAGS ?= GOOS=linux GOARCH=amd64 CGO_ENABLED=0
GO_FLAGS ?= GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on
KUBERNETES_CONFIG ?= "$(HOME)/.kube/config"
WATCH_NAMESPACE ?= ""
BIN_DIR ?= "build/_output/bin"
Expand All @@ -23,8 +23,13 @@ TEST_OPTIONS = $(VERBOSE) -kubeconfig $(KUBERNETES_CONFIG) -namespacedMan ../../

.DEFAULT_GOAL := build

.PHONY: vendor
vendor:
@echo Building vendor...
@${GO_FLAGS} go mod vendor

.PHONY: check
check:
check: vendor
@echo Checking...
@go fmt $(PACKAGES) > $(FMT_LOG)
@.travis/import-order-cleanup.sh stdout > $(IMPORT_LOG)
Expand All @@ -35,7 +40,7 @@ ensure-generate-is-noop: generate
@git diff -s --exit-code pkg/apis/jaegertracing/v1/zz_generated.deepcopy.go || (echo "Build failed: a model has been changed but the deep copy functions aren't up to date. Run 'make generate' and update your PR." && exit 1)

.PHONY: format
format:
format: vendor
@echo Formatting code...
@.travis/import-order-cleanup.sh inplace
@go fmt $(PACKAGES)
Expand All @@ -51,7 +56,7 @@ security:
@gosec -quiet -exclude=G104 $(PACKAGES) 2>/dev/null

.PHONY: build
build: format
build: vendor format
@echo Building...
@${GO_FLAGS} go build -o $(OUTPUT_BINARY) -ldflags $(LD_FLAGS)

Expand Down Expand Up @@ -170,7 +175,7 @@ ingress:
@minikube addons enable ingress

.PHONY: generate
generate:
generate: vendor
@operator-sdk generate k8s

.PHONY: test
Expand Down
15 changes: 12 additions & 3 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM centos

ENV OPERATOR=/usr/local/bin/jaeger-operator \
USER_UID=1001 \
USER_NAME=jaeger-operator

RUN INSTALL_PKGS=" \
openssl \
" && \
Expand All @@ -11,7 +15,12 @@ RUN INSTALL_PKGS=" \

COPY scripts/* /scripts/

USER nobody
# install operator binary
COPY build/_output/bin/jaeger-operator ${OPERATOR}

COPY build/bin /usr/local/bin
RUN /usr/local/bin/user_setup

ENTRYPOINT ["/usr/local/bin/entrypoint"]

ADD build/_output/bin/jaeger-operator /usr/local/bin/jaeger-operator
ENTRYPOINT ["/usr/local/bin/jaeger-operator"]
USER ${USER_UID}
12 changes: 12 additions & 0 deletions build/bin/entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh -e

# This is documented here:
# https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines

if ! whoami &>/dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-qaclana}:x:$(id -u):$(id -g):${USER_NAME:-qaclana} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi

exec ${OPERATOR} $@
13 changes: 13 additions & 0 deletions build/bin/user_setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -x

# ensure $HOME exists and is accessible by group 0 (we don't know what the runtime UID will be)
mkdir -p ${HOME}
chown ${USER_UID}:0 ${HOME}
chmod ug+rwx ${HOME}

# runtime user will need to be able to self-insert in /etc/passwd
chmod g+rw /etc/passwd

# no need for this script to remain in the image after running
rm $0
6 changes: 3 additions & 3 deletions deploy/olm-catalog/jaeger.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
name: jaeger-operator.v1.12.0
namespace: placeholder
namespace: default
annotations:
categories: "Logging & Tracing"
certified: "false"
containerImage: docker.io/jaegertracing/jaeger-operator:1.12.0
containerImage: docker.io/jpkroehling/jaeger-operator:latest
createdAt: "2019-05-22T14:35:56+00:00"
capabilities: Seamless Upgrades
support: Jaeger
Expand Down Expand Up @@ -255,7 +255,7 @@ spec:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: jaeger-operator
image: jaegertracing/jaeger-operator:1.12.0
image: jpkroehling/jaeger-operator:latest
imagePullPolicy: Always
name: jaeger-operator
ports:
Expand Down
9 changes: 9 additions & 0 deletions deploy/operator-group.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
name: jaeger-operator-group
namespace: default
spec:
targetNamespaces:
- default

57 changes: 29 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,42 @@ module github.com/jaegertracing/jaeger-operator

require (
cloud.google.com/go v0.36.0 // indirect
github.com/Azure/go-autorest/autorest v0.2.0 // indirect
github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 // indirect
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect
github.com/coreos/prometheus-operator v0.26.0 // indirect
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f // indirect
github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f // indirect
github.com/emicklei/go-restful v2.8.0+incompatible // indirect
github.com/emicklei/go-restful v2.8.1+incompatible // indirect
github.com/evanphx/json-patch v4.1.0+incompatible // indirect
github.com/go-logr/logr v0.1.0 // indirect
github.com/go-logr/zapr v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.17.2 // indirect
github.com/go-openapi/jsonreference v0.17.2 // indirect
github.com/go-openapi/spec v0.19.0 // indirect
github.com/go-openapi/swag v0.17.2 // indirect
github.com/gobuffalo/envy v1.6.15 // indirect
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
github.com/google/uuid v1.0.0 // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f // indirect
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/gophercloud/gophercloud v0.1.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v1.1.5 // indirect
github.com/markbates/inflect v1.0.4 // indirect
github.com/mitchellh/go-homedir v1.0.0
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/openshift/api v0.0.0-20180830153656-5ad8479f64f1
github.com/opentracing/opentracing-go v1.0.2 // indirect
github.com/operator-framework/operator-sdk v0.5.0
github.com/operator-framework/operator-sdk v0.8.2-0.20190522220659-031d71ef8154
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.0
github.com/prometheus/client_golang v0.9.2 // indirect
github.com/pkg/errors v0.8.1
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
github.com/prometheus/common v0.2.0 // indirect
github.com/prometheus/procfs v0.0.0-20190203183350-488faf799f86 // indirect
github.com/sirupsen/logrus v1.2.0
github.com/spf13/cast v1.3.0 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3 // indirect
github.com/spf13/viper v1.2.1
github.com/stretchr/testify v1.3.0
github.com/uber-go/atomic v1.4.0 // indirect
Expand All @@ -56,19 +46,30 @@ require (
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869 // indirect
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1 // indirect
golang.org/x/tools v0.0.0-20181114145209-99072bc9d7ad // indirect
k8s.io/api v0.0.0-20181213150558-05914d821849
k8s.io/apiextensions-apiserver v0.0.0-20181213153335-0fe22c71c476 // indirect
k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93
k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31
k8s.io/gengo v0.0.0-20181113154421-fd15ee9cc2f7 // indirect
k8s.io/klog v0.1.0 // indirect
k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d // indirect
golang.org/x/net v0.0.0-20190311183353-d8887717615a
k8s.io/api v0.0.0-20190222213804-5cb15d344471
k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628
k8s.io/client-go v0.0.0-20190507014756-65905f29c17c
k8s.io/code-generator v0.0.0-20180823001027-3dcf91f64f63
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6
k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d
sigs.k8s.io/controller-runtime v0.1.10
sigs.k8s.io/controller-tools v0.1.8 // indirect
sigs.k8s.io/controller-tools v0.1.10
sigs.k8s.io/testing_frameworks v0.1.1 // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
)

// Pinned to kubernetes-1.13.1
replace (
k8s.io/api => k8s.io/api v0.0.0-20181213150558-05914d821849
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20181213153335-0fe22c71c476
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93
)

replace (
github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.29.0
github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.8.1
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20181117043124-c2090bec4d9b
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.1.10
sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde
)
Loading

0 comments on commit 359e0a8

Please sign in to comment.