Skip to content

Commit

Permalink
upgrade operator-sdk to v0.10.0
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Revin <[email protected]>
  • Loading branch information
nrvnrvn committed Aug 16, 2019
1 parent d5d364c commit b582b98
Show file tree
Hide file tree
Showing 465 changed files with 10,303 additions and 194 deletions.
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://github.com/bazelbuild/rules_docker/issues/842
build --host_force_python=PY2 --stamp --workspace_status_command ./hack/print-status.sh
run --host_force_python=PY2 --stamp --workspace_status_command ./hack/print-status.sh
test --host_force_python=PY2 --sandbox_debug --test_output=errors
37 changes: 37 additions & 0 deletions .drone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
kind: pipeline
name: secreter
steps:

- name: test
image: l.gcr.io/google/bazel:0.28.1
commands:
- ./hack/build/test.sh
volumes:
- name: cache
path: /root/.cache

- name: build and push docker image
image: l.gcr.io/google/bazel:0.28.1
environment:
DOCKER_AUTH:
from_secret: docker-config-json
commands:
- ./hack/build/push-image.sh
volumes:
- name: cache
path: /root/.cache
when:
ref:
- refs/heads/master
- refs/tags/v*

volumes:
- name: cache
temp: {}

---
kind: signature
hmac: 370bc5033b992f2d40a4a2da77d5cf7e867b0110a40104c1c2fd92efe76a2da8

...
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ tags
.vscode/*
.history
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
bazel-*
.idea/
8 changes: 8 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
load("@bazel_gazelle//:def.bzl", "gazelle")

# gazelle:prefix github.com/amaizfinance/redis-operator
# gazelle:proto disable_global
gazelle(
name = "gazelle",
command = "fix",
)
54 changes: 54 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# fetch and load rules_go
http_archive(
name = "io_bazel_rules_go",
sha256 = "313f2c7a23fecc33023563f082f381a32b9b7254f727a7dd2d6380ccc6dfe09b",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.19.3/rules_go-0.19.3.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/0.19.3/rules_go-0.19.3.tar.gz",
],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_rules_dependencies()

go_register_toolchains()

# fetch and load gazelle
http_archive(
name = "bazel_gazelle",
sha256 = "be9296bfd64882e3c08e3283c58fcb461fa6dd3c171764fcc4cf322f60615a9b",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

# gazelle:repository_macro go.mod.bzl%go_repositories
gazelle_dependencies()

# fetch and load rules_docker
http_archive(
name = "io_bazel_rules_docker",
sha256 = "e513c0ac6534810eb7a14bf025a0f159726753f97f74ab7863c650d26e01d677",
strip_prefix = "rules_docker-0.9.0",
urls = ["https://github.com/bazelbuild/rules_docker/archive/v0.9.0.tar.gz"],
)

load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)

container_repositories()

load(
"@io_bazel_rules_docker//go:image.bzl",
_go_image_repos = "repositories",
)

_go_image_repos()
54 changes: 54 additions & 0 deletions cmd/manager/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "github.com/amaizfinance/redis-operator/cmd/manager",
visibility = ["//visibility:private"],
deps = [
"//pkg/apis:go_default_library",
"//pkg/controller:go_default_library",
"//vendor/github.com/operator-framework/operator-sdk/pkg/k8sutil:go_default_library",
"//vendor/github.com/operator-framework/operator-sdk/pkg/kube-metrics:go_default_library",
"//vendor/github.com/operator-framework/operator-sdk/pkg/leader:go_default_library",
"//vendor/github.com/operator-framework/operator-sdk/pkg/log/zap:go_default_library",
"//vendor/github.com/operator-framework/operator-sdk/pkg/metrics:go_default_library",
"//vendor/github.com/operator-framework/operator-sdk/pkg/restmapper:go_default_library",
"//vendor/github.com/operator-framework/operator-sdk/version:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//vendor/k8s.io/client-go/plugin/pkg/client/auth:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/client/config:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/manager:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/runtime/log:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/runtime/signals:go_default_library",
],
)

go_binary(
name = "manager",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)

load("@io_bazel_rules_docker//go:image.bzl", "go_image")

go_image(
name = "manager_image",
embed = [":go_default_library"],
pure = "on",
visibility = ["//visibility:public"],
)

load("@io_bazel_rules_docker//container:container.bzl", "container_push")

container_push(
name = "push_manager_image",
format = "Docker",
image = ":manager_image",
registry = "index.docker.io",
repository = "amaiz/redis-operator",
tag = "{ImageTag}",
)
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.12
require (
github.com/NYTimes/gziphandler v1.0.1 // indirect
github.com/cenkalti/backoff v2.1.1+incompatible
github.com/go-redis/redis v6.15.2+incompatible
github.com/operator-framework/operator-sdk v0.9.1-0.20190712203509-e1d904fa80a4
github.com/go-redis/redis v0.0.0-20190813142431-c5c4ad6a4cae
github.com/operator-framework/operator-sdk v0.10.0
github.com/spf13/cast v1.3.0
github.com/spf13/pflag v1.0.3
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5
Expand All @@ -32,5 +32,3 @@ replace (
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.9.0
Loading

0 comments on commit b582b98

Please sign in to comment.