Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mod tidy to test:services target #1573

Closed
Closed
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
4 changes: 2 additions & 2 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian
FROM debian:bullseye

RUN apt-get update
RUN apt-get install -y -qq git make python3 virtualenv curl sudo unzip apt-transport-https ca-certificates curl software-properties-common gnupg2
Expand All @@ -31,7 +31,7 @@ RUN sudo apt-get install -y -qq docker-ce docker-ce-cli containerd.io
RUN export CLOUD_SDK_REPO="cloud-sdk-stretch" && \
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update -y && apt-get install google-cloud-sdk google-cloud-sdk-app-engine-go -y -qq
apt-get update -y && apt-get install google-cloud-sdk google-cloud-sdk-app-engine-go google-cloud-sdk-gke-gcloud-auth-plugin -y -qq

# Install Golang
# https://github.com/docker-library/golang/blob/master/1.14/stretch/Dockerfile
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ YEAR_MONTH = $(shell date -u +'%Y%m')
YEAR_MONTH_DAY = $(shell date -u +'%Y%m%d')
MAJOR_MINOR_VERSION = $(shell echo $(BASE_VERSION) | cut -d '.' -f1).$(shell echo $(BASE_VERSION) | cut -d '.' -f2)
PROTOC_VERSION = 3.10.1
HELM_VERSION = 3.0.0
HELM_VERSION = 3.12.1
KUBECTL_VERSION = 1.16.2
MINIKUBE_VERSION = latest
GOLANGCI_VERSION = 1.18.0
Expand Down Expand Up @@ -636,13 +636,11 @@ delete-kind-cluster: build/toolchain/bin/kind$(EXE_EXTENSION) build/toolchain/bi
create-cluster-role-binding:
$(KUBECTL) create clusterrolebinding myname-cluster-admin-binding --clusterrole=cluster-admin --user=$(GCLOUD_ACCOUNT_EMAIL)

create-gke-cluster: GKE_VERSION = 1.20.8-gke.900 # gcloud beta container get-server-config --zone us-west1-a
create-gke-cluster: GKE_CLUSTER_SHAPE_FLAGS = --machine-type n1-standard-8 --enable-autoscaling --min-nodes 1 --num-nodes 6 --max-nodes 10 --disk-size 50
create-gke-cluster: GKE_FUTURE_COMPAT_FLAGS = --no-enable-basic-auth --no-issue-client-certificate --enable-ip-alias --metadata disable-legacy-endpoints=true --enable-autoupgrade
create-gke-cluster: build/toolchain/bin/kubectl$(EXE_EXTENSION) gcloud
$(GCLOUD) beta $(GCP_PROJECT_FLAG) container clusters create $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GKE_CLUSTER_SHAPE_FLAGS) $(GKE_FUTURE_COMPAT_FLAGS) $(GKE_CLUSTER_FLAGS) \
--enable-pod-security-policy \
--cluster-version $(GKE_VERSION) \
$(GCLOUD) $(GCP_PROJECT_FLAG) container clusters create $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GKE_CLUSTER_SHAPE_FLAGS) $(GKE_FUTURE_COMPAT_FLAGS) $(GKE_CLUSTER_FLAGS) \
--cluster-version 1.27.2-gke.2100 \
--image-type cos_containerd \
--tags open-match
$(MAKE) create-cluster-role-binding
Expand Down Expand Up @@ -736,6 +734,7 @@ build: assets
define test_folder
$(if $(wildcard $(1)/go.mod), \
cd $(1) && \
$(GO) mod tidy && \
$(GO) test -cover -test.count $(GOLANG_TEST_COUNT) -race ./... && \
$(GO) test -cover -test.count $(GOLANG_TEST_COUNT) -run IgnoreRace$$ ./... \
)
Expand Down
2 changes: 1 addition & 1 deletion install/helm/open-match/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ version: 0.0.0-dev
name: open-match
dependencies:
- name: redis
version: 12.3.3
version: 17.7.3
repository: https://charts.bitnami.com/bitnami
condition: open-match-core.redis.enabled
- name: open-match-telemetry
Expand Down
6 changes: 3 additions & 3 deletions install/helm/open-match/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ resources:
{{- if .Values.redis.usePassword }}
- name: redis-password
secret:
secretName: {{ include "call-nested" (list . "redis" "redis.fullname") }}
secretName: {{ include "call-nested" (list . "redis" "common.names.fullname") }}
{{- end -}}
{{- end -}}

Expand Down Expand Up @@ -210,7 +210,7 @@ http://{{ include "call-nested" (list . "open-match-telemetry.jaeger" "jaeger.co

{{/*
Call templates from sub-charts in a synthesized context, workaround for https://github.com/helm/helm/issues/3920
Mainly useful for things like `{{ include "call-nested" (list . "redis" "redis.fullname") }}`
Mainly useful for things like `{{ include "call-nested" (list . "redis" "common.names.fullname") }}`
https://github.com/helm/helm/issues/4535#issuecomment-416022809
https://github.com/helm/helm/issues/4535#issuecomment-477778391
*/}}
Expand All @@ -223,4 +223,4 @@ https://github.com/helm/helm/issues/4535#issuecomment-477778391
{{- $values = index $values . }}
{{- end }}
{{- include $template (dict "Chart" (dict "Name" (last $subchart)) "Values" $values "Release" $dot.Release "Capabilities" $dot.Capabilities) }}
{{- end }}
{{- end }}
16 changes: 14 additions & 2 deletions install/helm/open-match/templates/om-configmap-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,25 @@ data:
{{- if index .Values "redis" "sentinel" "enabled"}}
sentinelPort: {{ .Values.redis.sentinel.port }}
sentinelMaster: {{ .Values.redis.sentinel.masterSet }}
sentinelHostname: {{ include "call-nested" (list . "redis" "redis.fullname") }}
sentinelHostname: {{ include "call-nested" (list . "redis" "common.names.fullname") }}
sentinelUsePassword: {{ .Values.redis.sentinel.usePassword }}
{{- else}}
# Open Match's default Redis setups
hostname: {{ include "call-nested" (list . "redis" "redis.fullname") }}-master.{{ .Release.Namespace }}.svc.cluster.local
hostname: {{ include "call-nested" (list . "redis" "common.names.fullname") }}-master.{{ .Release.Namespace }}.svc.cluster.local
{{- if .Values.redis.redisPort }}
# source value: redis.redisPort = {{ .Values.redis.redisPort }}
port: {{ .Values.redis.redisPort }}
{{- else if index .Values "open-match-core" "redis" "port" }}
# source value: open-match-core.redis.port = {{ index .Values "open-match-core" "redis" "port"}}
port: {{ index .Values "open-match-core" "redis" "port" }}
{{- end }}
{{- if .Values.redis.user }}
# source value: redis.user = {{ .Values.redis.user }}
user: {{ .Values.redis.user }}
{{- else if index .Values "open-match-core" "redis" "user" }}
# source value: open-match-core.redis.user = {{ index .Values "open-match-core" "redis" "user"}}
user: {{ index .Values "open-match-core" "redis" "user"}}
{{- end }}
{{- end}}
{{- else }}
# BYO Redis setups
Expand Down
25 changes: 3 additions & 22 deletions install/helm/open-match/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,12 @@ configs:
# https://hub.helm.sh/charts/stable/redis
# https://github.com/helm/charts/tree/master/stable/redis
redis:
redisPort: 6379
usePassword: false
usePasswordFile: false
secretMountPath: /opt/bitnami/redis/secrets
architecture: standalone
auth:
enabled: false
configmap: |
maxclients 100000
maxmemory 500000000
sentinel:
enabled: true
masterSet: om-redis-master
port: 26379
master:
disableCommands: [] # don't disable 'FLUSH-' commands
resources:
Expand All @@ -130,20 +125,6 @@ redis:
enabled: false
metrics:
enabled: true
cluster:
slaveCount: 3
serviceAccount:
create: true
slave:
persistence:
enabled: false
resources:
requests:
memory: 1Gi
cpu: 1
limits:
memory: 2Gi
cpu: 2
sysctlImage:
# Enable this setting in production if you are running Open Match under Linux environment
enabled: true
Expand Down
29 changes: 10 additions & 19 deletions install/helm/open-match/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,40 +103,31 @@ configs:
configName: '{{ include "openmatch.configmap.override" . }}'

# Override Redis settings
# https://hub.helm.sh/charts/stable/redis
# https://github.com/helm/charts/tree/master/stable/redis
# https://github.com/bitnami/charts/tree/ba40e46ec6831e039f5bf213ab10e9748603ce6c/bitnami/redis
redis:
redisPort: 6379
usePassword: false
usePasswordFile: false
secretMountPath: /opt/bitnami/redis/secrets
configmap: |
architecture: standalone
auth:
enabled: false
commonConfiguration: |
maxclients 100000
maxmemory 300000000
sentinel:
enabled: true
masterSet: om-redis-master
port: 26379
usePassword: false
master:
disableCommands: [] # don't disable 'FLUSH-' commands
persistence:
enabled: false
resources:
requests:
memory: 300Mi
cpu: 0.5
metrics:
enabled: true
cluster:
slaveCount: 2
serviceAccount:
create: true
sysctlImage:
# Enable this setting in production if you are running Open Match under Linux environment
enabled: false
# Disable this setting in production if you are not running Redis in Linux
enabled: true
mountHostSys: true
# Redis may require some changes in the kernel of the host machine to work as expected,
# in particular increasing the somaxconn value and disabling transparent huge pages.
# https://github.com/helm/charts/tree/master/stable/redis#host-kernel-settings
# https://docs.bitnami.com/kubernetes/infrastructure/redis/administration/configure-kernel-settings/
command:
- /bin/sh
- -c
Expand Down