Skip to content

Commit

Permalink
Fix issue #1: Add service annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Reichl <[email protected]>
  • Loading branch information
thetredev committed Mar 16, 2024
1 parent 0d6a6db commit 4efa9f7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charts/steamcmd/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: steamcmd
version: 1.0.8
version: 1.0.9
appVersion: "20240309"
description: Sane SteamCMD Docker images
annotations:
Expand All @@ -9,5 +9,5 @@ annotations:
- name: Source
url: https://github.com/thetredev/helm-charts
artifacthub.io/changes: |
- kind: changed
description: Update base images to latest ones from Valve
- kind: added
description: Add service annotations
1 change: 1 addition & 0 deletions charts/steamcmd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The following table lists the configurable parameters of the helm chart and thei
| `network.ports.ssh.enabled` | Whether to enable the container SSH server | `false` | yes |
| `network.ports.ssh.port` | Exposed SSH port to use if SSH is enabled | `22` | no |
| `network.ports.ssh.secretName` | The secret containing the key `authorized_keys` to use for SSH server access | `nil` | yes if SSH is enabled, and cannot be `nil` if SSH is enabled |
| `network.serviceAnnotations` | Annotations to attach to the service object. | `nil` | no |
| `storage` | Persistent storage size (only local storage is supported at the moment) | `nil` | yes, cannot be `nil` |
| `resources.requests.memory` | Memory request value for the container | `512Mi` | no |
| `resources.requests.cpu` | CPU request value for the container | `200m` | no |
Expand Down
3 changes: 3 additions & 0 deletions charts/steamcmd/docs/values.yaml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ The SSH port (TCP) to expose if `network.ports.ssh.enabled` is set to `true`.
## network.ports.ssh.secretName
The secret name to load the `authorized_keys` file from. See https://github.com/thetredev/steamcmd?tab=readme-ov-file#ssh-server

## network.serviceAnnotations
Annotations to attach to the service object. See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations

## storage
Persistent storage size. See https://kubernetes.io/docs/concepts/storage/persistent-volumes/#capacity

Expand Down
4 changes: 4 additions & 0 deletions charts/steamcmd/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Namespace }}-{{ .Values.deployment.containerName }}-service
{{ if (default false .Values.network.serviceAnnotations) }}
annotations:
{{ toYaml .Values.network.serviceAnnotations | indent 2 }}
{{ end }}
spec:
type: LoadBalancer
loadBalancerIP: "{{ .Values.network.ip }}"
Expand Down
2 changes: 2 additions & 0 deletions charts/steamcmd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ network:
port: 22
# SSH secret name to use, has to contain key "authorized_keys"
# secretName: ssh-access
# serviceAnnotations:
# my-key: "my-value"

# Currently only local storage is supported for both server files and SSH host keys
storage: "5Gi"
Expand Down

0 comments on commit 4efa9f7

Please sign in to comment.