Skip to content

Commit

Permalink
NE-6425 - Support for IPv6 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Polanczyk authored Nov 21, 2023
1 parent 4b58290 commit abf7f68
Show file tree
Hide file tree
Showing 8 changed files with 744 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ cloudify-manager-worker/caas-policies/
cloudify-manager-worker/certs
cloudify-manager-worker/scripts
cloudify-manager-worker/charts/
cloudify-services/charts/
values-override.yaml
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ dev-cluster:
kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
.PHONY: dev-cluster

dev-cluster-ipv6:
kind create cluster --config "dev-cluster/kind-config-ipv6.yaml"
kubectl apply -f dev-cluster/deploy-ipv6.yaml
# opt out of online validation, kind won't have access to the internet necessarily
kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
.PHONY: dev-cluster-ipv6

regcred:
dev-cluster/aws_regcred.sh
.PHONY: regcred
Expand Down Expand Up @@ -38,4 +45,7 @@ load-images:
deploy:
dev-cluster/default_values_override.sh
helm install cloudify-services ./cloudify-services --values values-override.yaml
deploy-ipv6:
dev-cluster/default_values_override.sh
helm install cloudify-services ./cloudify-services --values values-override.yaml --values cloudify-services/values-ipv6.yaml
.PHONY: deploy
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ map $http_upgrade $connection_upgrade {
# REST and UI external server
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name _;

ssl_certificate /etc/cloudify/ssl/cloudify_external_cert.pem;
Expand All @@ -65,6 +66,7 @@ server {
# this easy mode of accessing the manager (especially using cfy).
server {
listen 80;
listen [::]:80;
server_name _;

{{ if .Values.nginx.rate_limit.enabled }}
Expand All @@ -81,6 +83,7 @@ server {
# REST and UI internal server - always SSL enabled
server {
listen 53333 ssl default_server http2;
listen [::]:53333 ssl default_server http2;

server_name _;

Expand Down
2 changes: 2 additions & 0 deletions cloudify-services/templates/rest-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ spec:
{{- end }}
- name: RUNTIME_ENVIRONMENT
value: "k8s"
- name: BIND_HOST
value: "[::]"
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
Expand Down
2 changes: 2 additions & 0 deletions cloudify-services/templates/stage-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ spec:
value: http
- name: RESTSERVICE_PORT
value: "80"
- name: LISTEN_HOST
value: "::"
image: {{ .Values.stage_backend.image }}
imagePullPolicy: {{ .Values.stage_backend.imagePullPolicy }}
securityContext:
Expand Down
27 changes: 27 additions & 0 deletions cloudify-services/values-ipv6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
rabbitmq:
replicaCount: 1
initContainers:
- name: ipv6-init
image: "docker.io/busybox:1.33.1"
imagePullPolicy: IfNotPresent
volumeMounts:
- name: ipv6-cfg
mountPath: /ipv6
command: ['sh', '-c', 'echo "{inet6, true}." > /ipv6/erl_inetrc']
extraVolumes:
- name: ipv6-cfg
emptyDir: {}
extraVolumeMounts:
- name: ipv6-cfg
mountPath: /ipv6
extraEnvVars:
- name: RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS
value: "-kernel inetrc '/ipv6/erl_inetrc' -proto_dist inet6_tcp"
- name: RABBITMQ_CTL_ERL_ARGS
value: "-proto_dist inet6_tcp"
extraConfiguration: |-
management.ssl.ip = ::
management.ssl.port = 15671
management.ssl.cacertfile = /opt/bitnami/rabbitmq/certs/ca_certificate.pem
management.ssl.certfile = /opt/bitnami/rabbitmq/certs/server_certificate.pem
management.ssl.keyfile = /opt/bitnami/rabbitmq/certs/server_key.pem
Loading

0 comments on commit abf7f68

Please sign in to comment.