Skip to content

Commit

Permalink
Support metrics on dualStack clusters (#426)
Browse files Browse the repository at this point in the history
Sail Operator uses `kube-rbac-proxy` to serve metrics securely.
It is configured to listen on `secure-listen-address` with an
`upstream` that points to the actual metrics server in the Sail
Operator listening on the loopback interface. Currently, the
`secure-listen-address` is configured with "0.0.0.0:8443" and this
PR updates it to ":8443" so that it can listen on both IPv4 and
IPv6 interfaces.

This PR also modifies the spec.ipFamilyPolicy of
sail-operator-metrics-service to PreferDualStack, so that it can
support all types of clusters.

Related to: #372
Signed-off-by: Sridhar Gaddam <[email protected]>
  • Loading branch information
sridhargaddam authored Oct 17, 2024
1 parent 62d9c90 commit 8d78113
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
control-plane: sail-operator
name: sail-operator-metrics-service
spec:
ipFamilyPolicy: PreferDualStack
ports:
- name: https
port: 8443
Expand Down
4 changes: 2 additions & 2 deletions bundle/manifests/sailoperator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ metadata:
capabilities: Seamless Upgrades
categories: OpenShift Optional, Integration & Delivery, Networking, Security
containerImage: quay.io/maistra-dev/sail-operator:0.2-latest
createdAt: "2024-10-17T05:05:02Z"
createdAt: "2024-10-17T09:56:08Z"
description: Experimental operator for installing Istio service mesh
features.operators.openshift.io/cnf: "false"
features.operators.openshift.io/cni: "true"
Expand Down Expand Up @@ -639,7 +639,7 @@ spec:
- linux
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --secure-listen-address=:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
Expand Down
1 change: 1 addition & 0 deletions chart/templates/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
name: {{ .Values.deployment.name }}-metrics-service
namespace: {{ .Release.Namespace }}
spec:
ipFamilyPolicy: PreferDualStack
ports:
- name: https
port: 8443
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
- linux
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --secure-listen-address=:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
Expand Down

0 comments on commit 8d78113

Please sign in to comment.