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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/data-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Red Hat values our customers' experience and privacy. It is important to us that

OpenShift 4 clusters send anonymized telemetry back to Red Hat about the following attributes. The telemetry is gathered by referencing your cluster ID and pull secret:

[embedmd]:# (../manifests/0000_50_cluster_monitoring_operator_04-config.yaml)
[embedmd]:# (../manifests/0000_50_cluster-monitoring-operator_04-config.yaml)
```yaml
apiVersion: v1
data:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ vendor:
go mod verify

.PHONY: generate
generate: pkg/manifests/bindata.go manifests/0000_50_cluster_monitoring_operator_02-role.yaml docs
generate: pkg/manifests/bindata.go manifests/0000_50_cluster-monitoring-operator_02-role.yaml docs

.PHONY: generate-in-docker
generate-in-docker:
Expand All @@ -102,14 +102,14 @@ pkg/manifests/bindata.go: $(GOBINDATA_BIN) $(ASSETS)
$(GOBINDATA_BIN) -mode 420 -modtime 1 -pkg manifests -o $@ assets/...

# Merge cluster roles
manifests/0000_50_cluster_monitoring_operator_02-role.yaml: hack/merge_cluster_roles.py hack/cluster-monitoring-operator-role.yaml.in $(ASSETS)
manifests/0000_50_cluster-monitoring-operator_02-role.yaml: hack/merge_cluster_roles.py hack/cluster-monitoring-operator-role.yaml.in $(ASSETS)
python2 hack/merge_cluster_roles.py hack/cluster-monitoring-operator-role.yaml.in `find assets | grep role | grep -v "role-binding" | sort` > $@

.PHONY: docs
docs: $(EMBEDMD_BIN) Documentation/telemeter_query
$(EMBEDMD_BIN) -w `find Documentation -name "*.md"`

Documentation/telemeter_query: manifests/0000_50_cluster_monitoring_operator_04-config.yaml hack/telemeter_query.go
Documentation/telemeter_query: manifests/0000_50_cluster-monitoring-operator_04-config.yaml hack/telemeter_query.go
go generate ./hack/telemeter_query.go > Documentation/telemeter_query

##############
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Metrics are collected from the following components:

## Adding new metrics to be sent via telemetry

To add new metrics to be sent via telemetry, simply add a selector that matches the time-series to be sent in [manifests/0000_50_cluster_monitoring_operator_04-config.yaml](manifests/0000_50_cluster_monitoring_operator_04-config.yaml).
To add new metrics to be sent via telemetry, simply add a selector that matches the time-series to be sent in [manifests/0000_50_cluster-monitoring-operator_04-config.yaml](manifests/0000_50_cluster-monitoring-operator_04-config.yaml).

Documentation on the data sent can be found in the [data collection documentation](Documentation/data-collection.md).

Expand Down
4 changes: 2 additions & 2 deletions hack/build-jsonnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ done

# shellcheck disable=SC1003
# Produce dashboard definitions in format understandable by CVO (it doesn't accept ConfigMapList)
grep -E -v '^apiVersion: v1|^items:|^kind: ConfigMapList' "${prefix}/grafana/console-dashboard-definitions.yaml" | sed 's/^\ \ //g;s/- apiVersion: v1/---\'$'\n''apiVersion: v1/g' > "manifests/0000_90_cluster_monitoring_operator_01-dashboards.yaml"
grep -E -v '^apiVersion: v1|^items:|^kind: ConfigMapList' "${prefix}/grafana/console-dashboard-definitions.yaml" | sed 's/^\ \ //g;s/- apiVersion: v1/---\'$'\n''apiVersion: v1/g' > "manifests/0000_90_cluster-monitoring-operator_01-dashboards.yaml"
rm -f "${prefix}/grafana/console-dashboard-definitions.yaml"

grep -H 'kind: CustomResourceDefinition' assets/prometheus-operator/* | cut -d: -f1 | while IFS= read -r f; do
mv "$f" "manifests/0000_50_cluster_monitoring_operator_00_$(basename "$f")"
mv "$f" "manifests/0000_50_cluster-monitoring-operator_00_$(basename "$f")"
done
2 changes: 1 addition & 1 deletion hack/local-cmo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kubectl patch clusterversion/version --type=json -p="[{\"op\": \"add\", \"path\"
kubectl -n openshift-monitoring scale --replicas=0 deployment/cluster-monitoring-operator

# shellcheck disable=SC2002
cat manifests/0000_50_cluster_monitoring_operator_04-config.yaml | gojsontoyaml -yamltojson | jq -r '.data["metrics.yaml"]' > /tmp/telemetry-config.yaml
cat manifests/0000_50_cluster-monitoring-operator_04-config.yaml | gojsontoyaml -yamltojson | jq -r '.data["metrics.yaml"]' > /tmp/telemetry-config.yaml

# shellcheck disable=SC2086
./operator ${IMAGES} -telemetry-config /tmp/telemetry-config.yaml -kubeconfig "${KUBECONFIG}" -namespace=openshift-monitoring -configmap=cluster-monitoring-config -logtostderr=true -v=4 2>&1 | tee operator.log
2 changes: 1 addition & 1 deletion hack/telemeter_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ func main() {
fmt.Println(s)
}

//go:generate go run -mod=vendor telemeter_query.go ../manifests/0000_50_cluster_monitoring_operator_04-config.yaml
//go:generate go run -mod=vendor telemeter_query.go ../manifests/0000_50_cluster-monitoring-operator_04-config.yaml