Skip to content

Commit

Permalink
Add label changes for service-monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
chiayi committed Jun 5, 2023
1 parent f2d6fdf commit d5c2459
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions install/helm/agones/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,31 @@
# 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
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 }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
{{- if $featureGates.SplitControllerAndExtensions }}
agones.dev/role: extensions
{{- else}}
agones.dev/role: controller
{{- end}}
endpoints:
- port: web
path: /metrics
Expand Down

0 comments on commit d5c2459

Please sign in to comment.