diff --git a/CHANGELOG.md b/CHANGELOG.md index e5c8cc9..39d2d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/charts/factorio-server-charts/Chart.yaml b/charts/factorio-server-charts/Chart.yaml index 0f856c7..ad9dd62 100644 --- a/charts/factorio-server-charts/Chart.yaml +++ b/charts/factorio-server-charts/Chart.yaml @@ -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 diff --git a/charts/factorio-server-charts/templates/rcon-api-service.yaml b/charts/factorio-server-charts/templates/rcon-api-service.yaml index d7c4684..5963e87 100644 --- a/charts/factorio-server-charts/templates/rcon-api-service.yaml +++ b/charts/factorio-server-charts/templates/rcon-api-service.yaml @@ -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 diff --git a/charts/factorio-server-charts/templates/rcon-service.yaml b/charts/factorio-server-charts/templates/rcon-service.yaml index 74ff326..de7449e 100644 --- a/charts/factorio-server-charts/templates/rcon-service.yaml +++ b/charts/factorio-server-charts/templates/rcon-service.yaml @@ -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 diff --git a/charts/factorio-server-charts/templates/service.yaml b/charts/factorio-server-charts/templates/service.yaml index 0c23d13..4e8c0be 100644 --- a/charts/factorio-server-charts/templates/service.yaml +++ b/charts/factorio-server-charts/templates/service.yaml @@ -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 }} diff --git a/charts/factorio-server-charts/values.yaml b/charts/factorio-server-charts/values.yaml index 6df23a6..0a17791 100644 --- a/charts/factorio-server-charts/values.yaml +++ b/charts/factorio-server-charts/values.yaml @@ -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: @@ -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: {} @@ -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"