Skip to content

Commit

Permalink
pkg: Upgrade SDK to v0.10.0 (#4)
Browse files Browse the repository at this point in the history
* pkg: Upgrade SDK to v0.10.0 and fix labels

* build: Update default image name

* ci: Add exception for hg install

* travis: Switch to bionic
  • Loading branch information
Victor Boissiere authored Sep 26, 2019
1 parent ce2bf16 commit 746e24f
Show file tree
Hide file tree
Showing 16 changed files with 498 additions and 244 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: go
go_import_path: github.com/neo9/pilot-operator
sudo: required
dist: bionic

cache:
directories:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Kubernetes operator to manage and deploy Java, NodeJS and web applications.

## Requirements

- Kubernetes 1.12.x (other versions are not tested yet)
- Kubernetes 1.14.x / 1.13.x (other versions are not tested yet)
- Go 1.12.x
- Operator SDK v0.8.1
- Operator SDK v0.10.0

## Local

Expand Down
2 changes: 1 addition & 1 deletion build/bin/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

Expand Down
5 changes: 5 additions & 0 deletions ci/install_operator_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ OPERATOR_SDK_VERSION=v0.8.1

set -e

cat <<EOF > ~/.hgrc
[hostsecurity]
disabletls10warning = true
EOF

curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/${OPERATOR_SDK_VERSION}/operator-sdk-${OPERATOR_SDK_VERSION}-x86_64-linux-gnu

curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/${OPERATOR_SDK_VERSION}/operator-sdk-${OPERATOR_SDK_VERSION}-x86_64-linux-gnu.asc
Expand Down
12 changes: 11 additions & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"context"
"flag"
"fmt"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"os"
"runtime"

Expand Down Expand Up @@ -116,7 +118,15 @@ func main() {
}

// Create Service object to expose the metrics port.
_, err = metrics.ExposeMetricsPort(ctx, metricsPort)
servicePorts := []v1.ServicePort{
{
Port: metricsPort,
Name: metrics.OperatorPortName,
Protocol: v1.ProtocolTCP,
TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: metricsPort},
},
}
_, err = metrics.CreateMetricsService(ctx, cfg, servicePorts)
if err != nil {
log.Info(err.Error())
}
Expand Down
57 changes: 19 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,54 +1,35 @@
module github.com/neo9/pilot-operator

require (
contrib.go.opencensus.io/exporter/ocagent v0.4.9 // indirect
github.com/Azure/go-autorest v11.5.2+incompatible // indirect
github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 // indirect
github.com/coreos/prometheus-operator v0.26.0 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/emicklei/go-restful v2.8.1+incompatible // indirect
github.com/NYTimes/gziphandler v1.0.1 // indirect
github.com/go-logr/logr v0.1.0
github.com/go-logr/zapr v0.1.0 // indirect
github.com/go-openapi/spec v0.19.2 // indirect
github.com/golang/mock v1.2.0 // indirect
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect
github.com/google/uuid v1.0.0 // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gophercloud/gophercloud v0.0.0-20190318015731-ff9851476e98 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.8.5 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/operator-framework/operator-sdk v0.8.1-0.20190621163125-c2b49e8f6a0e
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/go-openapi/spec v0.19.2
github.com/operator-framework/operator-sdk v0.10.1-0.20190919225052-3a85983ecc72
github.com/spf13/pflag v1.0.3
go.opencensus.io v0.19.2 // indirect
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/time v0.0.0-20180412165947-fbb02b2291d2 // indirect
k8s.io/api v0.0.0-20190313235455-40a48860b5ab
k8s.io/apimachinery v0.0.0-20190313205120-d7deff9243b1
k8s.io/client-go v2.0.0-alpha.0.0.20190313235726-6ee68ca5fd83+incompatible
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 // indirect
k8s.io/kube-state-metrics v1.6.0 // indirect
sigs.k8s.io/controller-runtime v0.1.10
k8s.io/api v0.0.0-20190612125737-db0771252981
k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad
k8s.io/client-go v11.0.0+incompatible
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208
sigs.k8s.io/controller-runtime v0.1.12
sigs.k8s.io/controller-tools v0.1.10
sigs.k8s.io/testing_frameworks v0.1.0 // indirect
)

// Pinned to kubernetes-1.13.1
// Pinned to kubernetes-1.13.4
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
k8s.io/client-go => k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31
k8s.io/api => k8s.io/api v0.0.0-20190222213804-5cb15d344471
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628
k8s.io/client-go => k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4
)

replace (
github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.29.0
// Pinned to v2.9.2 (kubernetes-1.13.1) so https://proxy.golang.org can
// resolve it correctly.
github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.0.0-20190424153033-d3245f150225
k8s.io/kube-state-metrics => k8s.io/kube-state-metrics v1.6.0
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.1.10
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.1.12
sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde
)

replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.10.0
Loading

0 comments on commit 746e24f

Please sign in to comment.