Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ $(KUSTOMIZE): .bingo/kustomize.mod
@echo "(re)installing $(GOBIN)/kustomize-v3.5.4"
@cd .bingo && $(GO) build -mod=mod -modfile=kustomize.mod -o=$(GOBIN)/kustomize-v3.5.4 "sigs.k8s.io/kustomize/kustomize/v3"

OPERATOR_SDK := $(GOBIN)/operator-sdk-v1.1.0
OPERATOR_SDK := $(GOBIN)/operator-sdk-v1.2.0
$(OPERATOR_SDK): .bingo/operator-sdk.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/operator-sdk-v1.1.0"
@cd .bingo && $(GO) build -mod=mod -modfile=operator-sdk.mod -o=$(GOBIN)/operator-sdk-v1.1.0 "github.com/operator-framework/operator-sdk/cmd/operator-sdk"
@echo "(re)installing $(GOBIN)/operator-sdk-v1.2.0"
@cd .bingo && $(GO) build -mod=mod -modfile=operator-sdk.mod -o=$(GOBIN)/operator-sdk-v1.2.0 "github.com/operator-framework/operator-sdk/cmd/operator-sdk"

OPM := $(GOBIN)/opm-v1.13.6
$(OPM): .bingo/opm.mod
Expand Down
4 changes: 2 additions & 2 deletions .bingo/operator-sdk.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/go-logr/zapr v0.1.1 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/operator-framework/operator-sdk v1.1.0 // cmd/operator-sdk
github.com/operator-framework/operator-sdk v1.2.0 // cmd/operator-sdk
github.com/rogpeppe/go-internal v1.5.0 // indirect
github.com/spf13/pflag v1.0.5
go.uber.org/zap v1.14.1 // indirect
Expand All @@ -16,7 +16,7 @@ require (
k8s.io/apimachinery v0.18.8
k8s.io/client-go v12.0.0+incompatible
k8s.io/kube-state-metrics v1.7.2 // indirect
sigs.k8s.io/controller-runtime v0.6.2
sigs.k8s.io/controller-runtime v0.6.3
)

replace (
Expand Down
2 changes: 1 addition & 1 deletion .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ JUNITREPORT="${gobin}/junitreport-v0.0.0-20201103082000-d8009dcf7503"

KUSTOMIZE="${gobin}/kustomize-v3.5.4"

OPERATOR_SDK="${gobin}/operator-sdk-v1.1.0"
OPERATOR_SDK="${gobin}/operator-sdk-v1.2.0"

OPM="${gobin}/opm-v1.13.6"

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ bundle: regenerate $(KUSTOMIZE)
cp bundle/manifests/elasticsearch-operator.clusterserviceversion.yaml manifests/${OCP_VERSION}/elasticsearch-operator.v${BUNDLE_VERSION}.clusterserviceversion.yaml
cp bundle/manifests/logging.openshift.io_elasticsearches.yaml manifests/${OCP_VERSION}/logging.openshift.io_elasticsearches_crd.yaml
cp bundle/manifests/logging.openshift.io_kibanas.yaml manifests/${OCP_VERSION}/logging.openshift.io_kibanas_crd.yaml
cp bundle/manifests/elasticsearch-operator-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml manifests/${OCP_VERSION}/
cp bundle/manifests/elasticsearch-operator-metrics-service_v1_service.yaml manifests/${OCP_VERSION}/
.PHONY: bundle

test-e2e-upgrade:
Expand All @@ -192,7 +194,8 @@ TEST_NAMESPACE?="e2e-test-${RANDOM_SUFFIX}"
test-e2e-olm: DEPLOYMENT_NAMESPACE="${TEST_NAMESPACE}"
test-e2e-olm: $(GO_JUNIT_REPORT) $(JUNITMERGE) $(JUNITREPORT) junitreportdir
TEST_NAMESPACE=${TEST_NAMESPACE} hack/test-e2e-olm.sh
$(JUNITMERGE) $$(find $$JUNIT_REPORT_OUTPUT_DIR -iname *.xml) > $(JUNIT_REPORT_OUTPUT_DIR)/junit.xml
echo "Complete e2e olm test"
$(JUNITMERGE) $$(find $$JUNIT_REPORT_OUTPUT_DIR -iname "*.xml") > $(JUNIT_REPORT_OUTPUT_DIR)/junit.xml
Comment on lines +197 to +198
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this temporary or to be replaced by merge-junit target?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is temporary and will be removed in the final version. I added this because sometimes I forgot to remove the tmp directory after each iteration.

.PHONY: test-e2e-olm

elasticsearch-catalog: elasticsearch-catalog-build elasticsearch-catalog-deploy
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
name: elasticsearch-operator
name: elasticsearch-operator-metrics-monitor
spec:
endpoints:
- interval: 1s
path: /metrics
port: http
scheme: http
selector:
matchLabels:
name: elasticsearch-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
name: elasticsearch-operator
name: elasticsearch-operator-metrics-service
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
name: elasticsearch-operator
type: ClusterIP
status:
loadBalancer: {}
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bases:
- ../rbac
- ../manager
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus
- ../prometheus

patchesStrategicMerge:

Expand Down
1 change: 1 addition & 0 deletions config/prometheus/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
resources:
- monitor.yaml
- service.yaml
11 changes: 6 additions & 5 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
name: controller-manager-metrics-monitor
namespace: system
name: elasticsearch-operator
name: elasticsearch-operator-metrics-monitor
spec:
endpoints:
- path: /metrics
port: https
port: http
scheme: http
interval: 1s
selector:
matchLabels:
control-plane: controller-manager
name: elasticsearch-operator
15 changes: 15 additions & 0 deletions config/prometheus/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
name: elasticsearch-operator
name: elasticsearch-operator-metrics-service
spec:
ports:
- name: http
port: 8080
targetPort: 8080
protocol: TCP
selector:
name: elasticsearch-operator
type: ClusterIP
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ require (
github.com/onsi/ginkgo v1.12.1
github.com/onsi/gomega v1.10.1
github.com/openshift/api v0.0.0-20200602204738-768b7001fe69
github.com/operator-framework/operator-sdk v0.19.4
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sirupsen/logrus v1.6.0 // indirect
go.uber.org/zap v1.16.0 // indirect
gopkg.in/yaml.v2 v2.3.0
k8s.io/api v0.18.8
k8s.io/apimachinery v0.18.8
k8s.io/client-go v12.0.0+incompatible
sigs.k8s.io/controller-runtime v0.6.2
sigs.k8s.io/controller-runtime v0.6.3
)

replace (
Expand Down
Loading