Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update k8s libs to 1.11 versions #398

Merged
merged 18 commits into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
ad1d972
chore(deps): update k8s libs to 1.11 versions
ecordell Jul 27, 2018
6a9b0f1
chore(codegen): update codegen for 1.11
ecordell Jul 27, 2018
f8d583b
fix(crds): update CRDs to validate in 1.11 (versions field now required)
ecordell Jul 27, 2018
4d6473a
fix(csv): k8sjson encoders don't properly omitempty on json.RawMessage
ecordell Jul 27, 2018
1105c76
fix(build_local): don't start minikube if already running
ecordell Jul 31, 2018
7586dd8
fix(csv): update ClusterServiceVersion for 1.11
ecordell Jul 31, 2018
87abf63
fix(olm): update ClusterServiceVersion control loops for 1.11
ecordell Jul 31, 2018
b5766c3
fix(ip): update InstallPlan for 1.11
ecordell Jul 31, 2018
ae8352b
fix(catalogs): update catalog data to use ClusterServiceVersion
ecordell Jul 31, 2018
3ea57ee
fix(catalog): update InstallPlan control loops for 1.11
ecordell Aug 1, 2018
33d522a
fix(catalogs): remove outdated EtcdCluster validation
ecordell Jul 31, 2018
83b38c6
fix(csv): update Subscription for 1.11
ecordell Aug 1, 2018
014bff8
fix(catalog): update Subscription control loops for 1.11
ecordell Aug 1, 2018
5e6a32c
fix(csv): update CatalogSource for 1.11
ecordell Aug 1, 2018
6a53974
feat(api): migrate apis to common group and regen apis/clients
ecordell Aug 1, 2018
a5635c2
chore(e2e): switch to using the versioned clients in e2e tests
ecordell Aug 2, 2018
c2429c6
feat(makefile): allow running a single e2e test from the make command
ecordell Aug 2, 2018
d0aefb4
chore(ocs): Update to prometheus 0.22.2 but disable e2e test
ecordell Aug 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ To run the tests for all go packages outside of the vendor directory, run:
$ make test
```

To run the e2e tests locally:

```sh
$ make e2e-local
```

To run a specific e2e test locally:

```sh
$ make e2e-local TEST=TestCreateInstallPlanManualApproval
```

#### Building

Ensure your version of go is up to date; check that you're running v1.9 with the
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ RUN go test -c -o /bin/e2e ./test/e2e/...
FROM alpine:latest as olm
LABEL olm=true
WORKDIR /
COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-manager/bin/alm /bin/alm
COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-manager/bin/olm /bin/olm
EXPOSE 8080
CMD ["/bin/alm"]
CMD ["/bin/olm"]

FROM alpine:latest as catalog
LABEL catalog=true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ COPY . .

RUN make build

RUN cp ./bin/alm /bin/alm
RUN cp ./bin/olm /bin/olm
RUN cp ./bin/catalog /bin/catalog
EXPOSE 8080
78 changes: 35 additions & 43 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@
version = "1.2.1"

[[constraint]]
branch = "release-1.9"
branch = "release-1.11"
name = "k8s.io/api"

[[constraint]]
branch = "release-1.9"
branch = "release-1.11"
name = "k8s.io/apiextensions-apiserver"

[[constraint]]
branch = "release-1.9"
branch = "release-1.11"
name = "k8s.io/apimachinery"

[[constraint]]
branch = "release-1.9"
branch = "release-1.11"
name = "k8s.io/apiserver"

[[constraint]]
name = "k8s.io/client-go"
version = "kubernetes-1.9.3"
version = "kubernetes-1.11.1"

[[constraint]]
name = "github.com/writeas/go-strip-markdown"
Expand Down
30 changes: 9 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ all: test build

test: schema-check cover.out

unit:
go test -v -race ./pkg/...

schema-check:
go run ./cmd/validator/main.go ./deploy/chart/catalog_resources

Expand Down Expand Up @@ -59,15 +62,15 @@ run-local-shift:

e2e-local:
. ./scripts/build_local.sh
. ./scripts/run_e2e_local.sh
. ./scripts/run_e2e_local.sh $(TEST)

e2e-local-shift:
. ./scripts/build_local_shift.sh
. ./scripts/run_e2e_local.sh
. ./scripts/run_e2e_local.sh $(TEST)

e2e-local-docker:
. ./scripts/build_local.sh
. ./scripts/run_e2e_docker.sh
. ./scripts/run_e2e_docker.sh $(TEST)

DEP := $(GOPATH)/bin/dep
$(DEP):
Expand Down Expand Up @@ -100,25 +103,10 @@ $(CODEGEN):
# dep doesn't currently support downloading dependencies that don't have go in the top-level dir.
# can move to managing with dep when merged: https://github.com/golang/dep/pull/1545
mkdir -p vendor/k8s.io/code-generator
git clone --branch release-1.9 https://github.com/kubernetes/code-generator.git vendor/k8s.io/code-generator
# codegen tools currently don't allow specifying custom boilerplate, so we move ours to the default location
mkdir -p $(GOPATH)/src/k8s.io/kubernetes/hack/boilerplate
cp boilerplate.go.txt $(GOPATH)/src/k8s.io/kubernetes/hack/boilerplate/boilerplate.go.txt

define replace
@find ./pkg/api/client -type f -exec \
sed -i.bak 's/\(\"'$(1)'\)\(-v1\)*\(s\)*/\1-v1\3/g' {} \; -exec rm {}.bak \;
@find ./pkg/api/client -type f -exec \
sed -i.bak 's/Group: \"'$(1)'-v1\"/Group: \"app.coreos.com\"/g' {} \; -exec rm {}.bak \;
endef
git clone --branch release-1.11 https://github.com/kubernetes/code-generator.git vendor/k8s.io/code-generator

codegen: $(CODEGEN)
$(CODEGEN) all $(PKG)/pkg/api/client $(PKG)/pkg/api/apis \
"catalogsource:v1alpha1 clusterserviceversion:v1alpha1 installplan:v1alpha1 subscription:v1alpha1"
# codegen doesn't respect pluralnames, so we manually set them here
$(call replace,"catalogsource")
$(call replace,"clusterserviceversion")
$(call replace,"installplan")
$(call replace,"subscription")
$(CODEGEN) all $(PKG)/pkg/api/client $(PKG)/pkg/api/apis "operators:v1alpha1"

verify-codegen: codegen
git diff --exit-code
Expand Down
6 changes: 3 additions & 3 deletions cmd/alm/main.go → cmd/olm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

log "github.com/sirupsen/logrus"

"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/alm"
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/olm"
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/signals"
)

Expand Down Expand Up @@ -74,7 +74,7 @@ func main() {
namespaces := strings.Split(*watchedNamespaces, ",")

// Create a new instance of the operator.
almOperator, err := alm.NewALMOperator(*kubeConfigPath, *wakeupInterval, annotation, namespaces)
operator, err := olm.NewOperator(*kubeConfigPath, *wakeupInterval, annotation, namespaces)

if err != nil {
log.Fatalf("error configuring operator: %s", err.Error())
Expand All @@ -86,5 +86,5 @@ func main() {
})
go http.ListenAndServe(":8080", nil)

almOperator.Run(stopCh)
operator.Run(stopCh)
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! validate-crd: ./deploy/chart/templates/03-clusterserviceversion.crd.yaml
#! parse-kind: ClusterServiceVersion
apiVersion: app.coreos.com/v1alpha1
kind: ClusterServiceVersion-v1
kind: ClusterServiceVersion
metadata:
name: chargeback-helm-operator.v0.5.1
namespace: placeholder
Expand Down
Loading