Skip to content

adding support for ipFamilyPolicy #65

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

Merged
merged 5 commits into from
Nov 7, 2024
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Changelog

### V2.2.3

#### Non-Breaking Changes

- Adding support for ipFamilyPolicy, fixing [Issue 63](https://github.com/SQLJames/factorio-server-charts/issues/63)

### V2.2.2

#### Non-Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion charts/factorio-server-charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.2.2
version: 2.2.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
10 changes: 10 additions & 0 deletions charts/factorio-server-charts/templates/rcon-api-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}}
{{- if .Values.rconAPI.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.rconAPI.ipFamilyPolicy }}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}}
{{- if .Values.rconAPI.ipFamilies }}
ipFamilies: {{ toYaml .Values.rconAPI.ipFamilies | nindent 4 }}
{{- end }}
{{- end }}
type: {{ .Values.rconAPI.type }}
ports:
- name: http
Expand Down
10 changes: 10 additions & 0 deletions charts/factorio-server-charts/templates/rcon-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}}
{{- if .Values.rcon.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.rcon.ipFamilyPolicy }}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}}
{{- if .Values.rcon.ipFamilies }}
ipFamilies: {{ toYaml .Values.rcon.ipFamilies | nindent 4 }}
{{- end }}
{{- end }}
type: {{ .Values.rcon.type }}
ports:
- name: rcon
Expand Down
10 changes: 10 additions & 0 deletions charts/factorio-server-charts/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ metadata:
{{- end }}
{{- end }}
spec:
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}}
{{- if .Values.service.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}}
{{- if .Values.service.ipFamilies }}
ipFamilies: {{ toYaml .Values.service.ipFamilies | nindent 4 }}
{{- end }}
{{- end }}
type: {{ .Values.service.type }}
{{- if .Values.service.externalTrafficPolicy}}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
Expand Down
33 changes: 33 additions & 0 deletions charts/factorio-server-charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ nodeSelector: {}
## The best way ist to define a ClusterIP service and define one or more externalIPs. Of course this IPs must be available on the node the factorio pod runs on!
service:
type: NodePort
## Represents the dual-stack-ness requested or required by this Service. Possible values are
## SingleStack, PreferDualStack or RequireDualStack.
## The ipFamilies and clusterIPs fields depend on the value of this field.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilyPolicy: "SingleStack"

## List of IP families (e.g. IPv4, IPv6) assigned to the service. This field is usually assigned automatically
## based on cluster configuration and the ipFamilyPolicy field.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilies:
- IPv4
port: 31497
## If you are able to map an external IP, set it here
# externalIPs:
Expand Down Expand Up @@ -332,6 +343,17 @@ port_fixer:
## @param rcon.port RCON service external port
# Password and port for the rcon service
rcon:
## Represents the dual-stack-ness requested or required by this Service. Possible values are
## SingleStack, PreferDualStack or RequireDualStack.
## The ipFamilies and clusterIPs fields depend on the value of this field.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilyPolicy: "SingleStack"

## List of IP families (e.g. IPv4, IPv6) assigned to the service. This field is usually assigned automatically
## based on cluster configuration and the ipFamilyPolicy field.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilies:
- IPv4
external: true
type: LoadBalancer
serviceAnnotations: {}
Expand Down Expand Up @@ -359,6 +381,17 @@ rcon:
## @param rconAPI.ingress.tls.enabled Enable or disable TLS for the Ingress
## @param rconAPI.ingress.tls.secretName Kubernetes Secret name for TLS certificates used by the Ingress
rconAPI:
## Represents the dual-stack-ness requested or required by this Service. Possible values are
## SingleStack, PreferDualStack or RequireDualStack.
## The ipFamilies and clusterIPs fields depend on the value of this field.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilyPolicy: "SingleStack"

## List of IP families (e.g. IPv4, IPv6) assigned to the service. This field is usually assigned automatically
## based on cluster configuration and the ipFamilyPolicy field.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilies:
- IPv4
enabled: false
image:
repository: "ghcr.io/nekomeowww/factorio-rcon-api"
Expand Down
Loading