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 2 new flags to control the Helm installation: #533

Merged
merged 1 commit into from
Jan 30, 2019
Merged
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
2 changes: 2 additions & 0 deletions install/helm/agones/templates/admissionregistration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{{- $altName1 := printf "agones-controller-service.%s" .Release.Namespace }}
{{- $altName2 := printf "agones-controller-service.%s.svc" .Release.Namespace }}
{{- $cert := genSignedCert $cn nil (list $altName1 $altName2) 3650 $ca }}
{{- if .Values.agones.registerWebhooks }}
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
Expand Down Expand Up @@ -92,6 +93,7 @@ webhooks:
- "v1alpha1"
operations:
- CREATE
{{- end }}
---
apiVersion: v1
kind: Secret
Expand Down
2 changes: 2 additions & 0 deletions install/helm/agones/templates/crds/gameserverallocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- if .Values.agones.crds.install }}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -76,4 +77,5 @@ spec:
metadata:
type: object

{{- end }}

2 changes: 2 additions & 0 deletions install/helm/agones/templates/serviceaccounts/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- if .Values.agones.registerServiceAccounts }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -23,6 +24,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
---
{{- end}}
{{- if .Values.agones.rbacEnabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
4 changes: 3 additions & 1 deletion install/helm/agones/templates/serviceaccounts/sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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.
{{- if .Values.agones.registerServiceAccounts }}
{{- range .Values.gameservers.namespaces }}
apiVersion: v1
kind: ServiceAccount
Expand Down Expand Up @@ -64,4 +65,5 @@ roleRef:
name: {{ $.Values.agones.serviceaccount.sdk }}
---
{{- end }}
{{- end }}
{{- end }}
{{- end }}
5 changes: 4 additions & 1 deletion install/helm/agones/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ agones:
stackdriverEnabled: false
stackdriverProjectID: ""
rbacEnabled: true
registerServiceAccounts: true
registerWebhooks: true
crds:
install: true
cleanupOnDelete: true
Expand Down Expand Up @@ -108,4 +110,5 @@ gameservers:
namespaces:
- default
minPort: 7000
maxPort: 8000
maxPort: 8000

4 changes: 1 addition & 3 deletions install/yaml/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# 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.

apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -144,6 +143,7 @@ roleRef:
kind: ClusterRole
name: agones-sdk
---

---
# Source: agones/templates/crds/fleet.yaml
# Copyright 2018 Google Inc. All Rights Reserved.
Expand Down Expand Up @@ -647,7 +647,6 @@ spec:
# 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.

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -749,7 +748,6 @@ spec:
type: object



---
# Source: agones/templates/crds/gameserverset.yaml
# Copyright 2018 Google Inc. All Rights Reserved.
Expand Down
6 changes: 4 additions & 2 deletions site/content/en/docs/Installation/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,14 @@ The following tables lists the configurable parameters of the Agones chart and t

{{% feature publishVersion="0.8.0" %}}
**New Configuration Features:**

| Parameter | Description | Default |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------- |
| `agones.metrics.prometheusEnabled` | Enables controller metrics on port `8080` and path `/metrics` | `true` |
| `agones.metrics.stackdriverEnabled` | Enables Stackdriver exporter of controller metrics | `false` |
| `agones.metrics.stackdriverProjectID` | This overrides the default gcp project id for use with stackdriver | `` |
| `agones.registerWebhooks` | Registers the webhooks used for the admission controller | `true` |
| `agones.registerServiceAccounts` | Attempts to create service accounts for the controllers | `true` |
| `agones.controller.nodeSelector` | Controller [node labels](nodeSelector) for pod assignment | `{}` |
| `agones.controller.tolerations` | Controller [toleration][toleration] labels for pod assignment | `[]` |
| `agones.controller.affinity` | Controller [affinity](affinity) settings for pod assignment | `{}` |
Expand Down Expand Up @@ -194,7 +196,7 @@ $ helm install --name my-release --namespace agones-system -f values.yaml agones

## TLS Certificates

By default agones chart generates tls certificates used by the adminission controller, while this is handy, it requires the agones controller to restart on each `helm upgrade` command.
By default agones chart generates tls certificates used by the adminission controller, while this is handy, it requires the agones controller to restart on each `helm upgrade` command.
For most used cases the controller would have required a restart anyway (eg: controller image updated). However if you really need to avoid restarts we suggest that you turn off tls automatic generation (`agones.controller.generateTLS` to `false`) and provide your own certificates (`certs/server.crt`,`certs/server.key`).

> **Tip**: You can use our script located at `cert/cert.sh` to generates them.
Expand Down