Skip to content

Commit

Permalink
Merge pull request #5 from pb82/rename-match-namespace
Browse files Browse the repository at this point in the history
rename namespace selector
  • Loading branch information
pb82 authored Feb 5, 2019
2 parents 10f313b + ee92a2d commit be29e01
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deploy/crds/Grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
properties:
spec:
properties:
monitoringNamespaceSelector:
dashboardNamespaceSelector:
description: A label selector is a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. An empty
label selector matches all objects. A null label selector matches
Expand Down
2 changes: 1 addition & 1 deletion deploy/examples/Grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ metadata:
name: example-grafana
spec:
prometheusUrl: "http://prometheus-application-monitoring:9090"
monitoringNamespaceSelector:
dashboardNamespaceSelector:
matchLabels:
monitoring-key: middleware
4 changes: 2 additions & 2 deletions pkg/apis/integreatly/v1alpha1/grafana_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
type GrafanaSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
PrometheusUrl string `json:"prometheusUrl"`
MonitoringNamespaceSelector *metav1.LabelSelector `json:"monitoringNamespaceSelector,omitempty"`
PrometheusUrl string `json:"prometheusUrl"`
DashboardNamespaceSelector *metav1.LabelSelector `json:"dashboardNamespaceSelector,omitempty"`
}

// GrafanaStatus defines the observed state of Grafana
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/integreatly/v1alpha1/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion pkg/controller/grafana/grafana_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (r *ReconcileGrafana) Reconcile(request reconcile.Request) (reconcile.Resul
}

func (r *ReconcileGrafana) ReconcileNamespaces(cr *integreatly.Grafana) (reconcile.Result, error) {
namespaces, err := r.helper.getMonitoringNamespaces(cr.Spec.MonitoringNamespaceSelector)
namespaces, err := r.helper.getMonitoringNamespaces(cr.Spec.DashboardNamespaceSelector)
if err != nil {
log.Error(err, "Error listing namespaces")
return reconcile.Result{}, err
Expand Down

0 comments on commit be29e01

Please sign in to comment.