mirror of
https://github.com/googleforgames/open-match.git
synced 2025-03-27 08:20:47 +00:00
* Fix indent of TLS certificate annotations Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Small whitespace fixes Picked up the VSCode Yaml auto-formatter. Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Don't pass 'query' config to open-match-customize It's not used. Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Don't pass frontend/backend to open-match-scale They're not used. Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Allow redis to derive resource names from the release This ensures that multiple OpenMatch installs in a single namespace do not attempt to install Redis stacks with the same resource names. Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Include release names in PodSecurityPolicies This avoids conflicts between multiple Open Match installations in the same namespace. `openmatch.fullname` named template per Helm default chart. Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Make the Service Account name release-dependent This makes the existing global.kubernetes.serviceAccount value an override if specified, but if left unspecified, an appropriate name will be chosen. Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Make the RBAC resource names release-dependent Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Make the TLS Secret names release-dependent Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Make the CI-test resource names release-dependent Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Make all Pod/Service names release-dependent Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Make Grafana dashboard names release-dependent Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Make open-match-scale slightly more standalone This makes the hostname templates more standard in their case, because there is no need to coordinate the hostname with the superchart. This chart still uses a lot of templates from the open-match chart though, so it's not yet standalone-installable. Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Make ConfigMap default names release-dependent A specific ConfigMap can be applied in the same way it was previously, by overriding configs.default.configName and configs.override.configName, in which case it is up to the person doing the deployment to manage name conflicts. Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Use correct Jaeger service names for subcharts This fixes an existing issue where the Jaeger connection URLs in the configuration would be incorrect if your Helm chart was not installed as a release named "open-match". Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net> * Populate Grafana Datasource using a ConfigMap This allows us to access the Prometheus subchart's named template to get the correct Service name for the datasource. This fixes an existing issue where the Prometheus data source URL in Grafana would be incorrect if your Helm chart was not installed as a release named "open-match". Signed-off-by: Paul "Hampy" Hampson <p_hampson@wargaming.net>
104 lines
3.8 KiB
YAML
104 lines
3.8 KiB
YAML
# Copyright 2019 Google LLC
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# 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.
|
|
|
|
{{- if index .Values "open-match-core" "enabled" }}
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: {{ include "openmatch.frontend.hostName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
|
labels:
|
|
app: {{ template "openmatch.name" . }}
|
|
component: frontend
|
|
release: {{ .Release.Name }}
|
|
spec:
|
|
selector:
|
|
app: {{ template "openmatch.name" . }}
|
|
component: frontend
|
|
release: {{ .Release.Name }}
|
|
{{- $portType := coalesce .Values.global.kubernetes.service.portType .Values.frontend.portType -}}
|
|
{{- if eq $portType "ClusterIP" }}
|
|
clusterIP: None
|
|
{{- end }}
|
|
type: {{ $portType }}
|
|
ports:
|
|
- name: grpc
|
|
protocol: TCP
|
|
port: {{ .Values.frontend.grpcPort }}
|
|
- name: http
|
|
protocol: TCP
|
|
port: {{ .Values.frontend.httpPort }}
|
|
---
|
|
apiVersion: autoscaling/v1
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ include "openmatch.frontend.hostName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ include "openmatch.frontend.hostName" . }}
|
|
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "openmatch.frontend.hostName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
|
labels:
|
|
app: {{ template "openmatch.name" . }}
|
|
component: frontend
|
|
release: {{ .Release.Name }}
|
|
spec:
|
|
replicas: {{ .Values.frontend.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ template "openmatch.name" . }}
|
|
component: frontend
|
|
template:
|
|
metadata:
|
|
namespace: {{ .Release.Namespace }}
|
|
annotations:
|
|
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
|
{{- include "prometheus.annotations" (dict "port" .Values.frontend.httpPort "prometheus" .Values.global.telemetry.prometheus) | nindent 8 }}
|
|
labels:
|
|
app: {{ template "openmatch.name" . }}
|
|
component: frontend
|
|
release: {{ .Release.Name }}
|
|
spec:
|
|
{{- include "openmatch.labels.nodegrouping" . | nindent 6 }}
|
|
volumes:
|
|
{{- include "openmatch.volumes.configs" (. | merge (dict "configs" .Values.configs)) | nindent 8}}
|
|
{{- include "openmatch.volumes.tls" . | nindent 8}}
|
|
{{- include "openmatch.volumes.withredis" . | nindent 8}}
|
|
serviceAccountName: {{ include "openmatch.serviceAccount.name" . }}
|
|
containers:
|
|
- name: {{ include "openmatch.frontend.hostName" . }}
|
|
volumeMounts:
|
|
{{- include "openmatch.volumemounts.configs" (dict "configs" .Values.configs) | nindent 10 }}
|
|
{{- include "openmatch.volumemounts.tls" . | nindent 10 }}
|
|
{{- include "openmatch.volumemounts.withredis" . | nindent 10}}
|
|
image: "{{ .Values.global.image.registry }}/{{ .Values.frontend.image}}:{{ .Values.global.image.tag }}"
|
|
ports:
|
|
- name: grpc
|
|
containerPort: {{ .Values.frontend.grpcPort }}
|
|
- name: http
|
|
containerPort: {{ .Values.frontend.httpPort }}
|
|
{{- include "openmatch.container.common" . | nindent 8 }}
|
|
{{- include "kubernetes.probe" (dict "port" .Values.frontend.httpPort "isHTTPS" .Values.global.tls.enabled) | nindent 8 }}
|
|
{{- end }}
|