Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

AEROGEAR-9985 - Upgrade mss-operator to operator-sdk v0.10.0 #177

Merged
merged 6 commits into from Oct 8, 2019

Conversation

aliok
Copy link
Member

@aliok aliok commented Oct 4, 2019

Verification instructions:

Enable anyuid:

minishift addons enable anyuid
minishift addons apply anyuid

Install Integreatly application monitoring operator:

clone https://github.com/integr8ly/application-monitoring-operator/ under your GOPATH.
make cluster/install

If you see an error in Prometheus regarding file system permissions, you need to chmod 777 the host path:

oc get pvc
oc get pv pv0058 -o yaml
# host path is /var/lib/minishift/base/openshift.local.pv/pv0058
minishift ssh
sudo chmod -R 777 /var/lib/minishift/base/openshift.local.pv/pv0058
exit
# delete prometheus pod to have the statefulset recreate it

Deploy MSS operator, monitoring for it, and an example app

# first, change image in operator.yaml to aliok/mss_opr_oct_1_1337
make install
make monitoring/install
oc project mobile-security-service-apps
make example-app/apply

Check these:

  1. MSS is running, you can see the example app in MSS console
  2. You can see MSS operator and MSS service in Prometheus targets
  3. You can see MSS operator and MSS service related rules in Prometheus rules
  4. You can see MSS operator and MSS service related dashboards in Grafana

Note that some of the stuff in Prom/Grafana doesn't show up properly in Minishift. I assume they will show up in RHMI cluster as these Prom queries came all the way until today.

@aliok
Copy link
Member Author

aliok commented Oct 4, 2019

@grdryn @psturc @laurafitzgerald
Ready for review now

grdryn
grdryn previously approved these changes Oct 7, 2019
@@ -7,7 +7,9 @@ jobs:
working_directory: /go/src/github.com/aerogear/mobile-security-service-operator

docker:
- image: circleci/golang:1.10
- image: circleci/golang:1.12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@psturc Do you know what version of Go is installed in the Jenkins agent that compiles?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grdryn
Things were failing badly with the SDK with that version of Golang. Some dependency required Golang 1.12.

@psturc Can we update Golang version in Jenkins, if it is old?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the version of go in Jenkins slave is v1.12.6

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, should be no problems then!

@@ -216,13 +214,13 @@ code/gen:
.PHONY: test/run
test/run:
@echo Running tests:
GOCACHE=off go test -cover $(TEST_PKGS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the significance of this being here originally, and is it good that it's being removed now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Go 1.1.2 release notes (https://golang.org/doc/go1.12)

The build cache is now required as a step toward eliminating $GOPATH/pkg. Setting the environment variable GOCACHE=off will cause go commands that write to the cache to fail.

I had to remove this parameter to make things working with Go 1.12

cmd/manager/main.go Outdated Show resolved Hide resolved
deploy/role.yaml Outdated Show resolved Hide resolved
laurafitzgerald
laurafitzgerald previously approved these changes Oct 7, 2019
Copy link
Contributor

@laurafitzgerald laurafitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. @grdryn are you doing the verification? If you want me to do it just ping me here.

@grdryn
Copy link
Member

grdryn commented Oct 7, 2019

I haven't done any verification yet, I will though 👍

@grdryn
Copy link
Member

grdryn commented Oct 7, 2019

@aliok along with the other comments I left in my original review, could you also add a stage like the following to the Jenkinsfile, so that we're using the correct version of the operator-sdk CLI there: https://github.com/aerogear/unifiedpush-operator/blob/master/Jenkinsfile#L61..L73

Copy link
Member

@grdryn grdryn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have verified this now. I believe at least my previous review comment about wrapping the creation of the servicemonitor should be addressed, since otherwise local development is a little broken.

@grdryn grdryn self-requested a review October 7, 2019 14:18
Co-Authored-By: Gerard Ryan <gryan@redhat.com>
@aliok aliok dismissed stale reviews from laurafitzgerald and grdryn via ed136be October 8, 2019 07:36
@aliok
Copy link
Member Author

aliok commented Oct 8, 2019

All comments addressed now.
Merging!

@aliok aliok merged commit 97ff907 into aerogear:master Oct 8, 2019
@aliok aliok deleted the AEROGEAR-9985 branch October 8, 2019 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants