diff --git a/install/helm/agones/templates/service-monitor.yaml b/install/helm/agones/templates/service-monitor.yaml index 612e9d8443..6d601b8c87 100644 --- a/install/helm/agones/templates/service-monitor.yaml +++ b/install/helm/agones/templates/service-monitor.yaml @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +{{- $featureGates := include "agones.featureGates" . | fromYaml }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor @@ -19,7 +20,11 @@ metadata: name: agones-controller-monitor namespace: {{ .Release.Namespace }} labels: +{{- if $featureGates.SplitControllerAndExtensions }} + agones.dev/role: extensions +{{- else}} agones.dev/role: controller +{{- end}} app: {{ template "agones.name" . }} chart: {{ template "agones.chart" . }} release: {{ .Release.Name }} @@ -27,7 +32,11 @@ metadata: spec: selector: matchLabels: +{{- if $featureGates.SplitControllerAndExtensions }} + agones.dev/role: extensions +{{- else}} agones.dev/role: controller +{{- end}} endpoints: - port: web path: /metrics