Skip to content

Commit

Permalink
fix conflict port for metrics replace 8443 for 6443
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 committed Jan 2, 2025
1 parent c8e795b commit 8785f6e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion catalogd/cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func main() {
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.StringVar(&systemNamespace, "system-namespace", "", "The namespace catalogd uses for internal state, configuration, and workloads")
flag.StringVar(&catalogServerAddr, "catalogs-server-addr", ":8443", "The address where the unpacked catalogs' content will be accessible")
flag.StringVar(&catalogServerAddr, "catalogs-server-addr", ":6443", "The address where the unpacked catalogs' content will be accessible")
flag.StringVar(&externalAddr, "external-address", "catalogd-service.olmv1-system.svc", "The external address at which the http(s) server is reachable.")
flag.StringVar(&cacheDir, "cache-dir", "/var/cache/", "The directory in the filesystem that catalogd will use for file based caching")
flag.BoolVar(&catalogdVersion, "version", false, "print the catalogd version and exit")
Expand Down
4 changes: 2 additions & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func main() {
caCertDir string
globalPullSecret string
)
flag.StringVar(&metricsAddr, "metrics-bind-address", "", "The address for the metrics endpoint. Requires tls-cert and tls-key. (Default: ':8443')")
flag.StringVar(&metricsAddr, "metrics-bind-address", "", "The address for the metrics endpoint. Requires tls-cert and tls-key. (Default: ':6443')")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.StringVar(&caCertDir, "ca-certs-dir", "", "The directory of TLS certificate to use for verifying HTTPS connections to the Catalogd and docker-registry web servers.")
flag.StringVar(&certFile, "tls-cert", "", "The certificate file used for the metrics server. Required to enable the metrics server. Requires tls-key.")
Expand Down Expand Up @@ -138,7 +138,7 @@ func main() {
}

if certFile != "" && keyFile != "" && metricsAddr == "" {
metricsAddr = ":8443"
metricsAddr = ":6443"
}

ctrl.SetLogger(textlogger.NewLogger(textlogger.NewConfig()))
Expand Down
2 changes: 1 addition & 1 deletion config/base/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
- /manager
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=:8443"
- "--metrics-bind-address=:6443"
- "--leader-elect"
image: controller:latest
imagePullPolicy: IfNotPresent
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestOperatorControllerMetricsExportedEndpoint(t *testing.T) {
require.NoError(t, waitErr, "Error waiting for curl pod to be ready: %s", string(waitOutput))

t.Log("Validating the metrics endpoint")
metricsURL := "https://operator-controller-controller-manager-metrics-service." + namespace + ".svc.cluster.local:8443/metrics"
metricsURL := "https://operator-controller-controller-manager-metrics-service." + namespace + ".svc.cluster.local:6443/metrics"
curlCmd := exec.Command(client, "exec", curlPod, "-n", namespace, "--",
"curl", "-v", "-k", "-H", "Authorization: Bearer "+token, metricsURL)
output, err = curlCmd.CombinedOutput()
Expand Down

0 comments on commit 8785f6e

Please sign in to comment.