Skip to content

Commit

Permalink
Change caddy sidecar image (#1066)
Browse files Browse the repository at this point in the history
* refactor: change crc-caddy-plugin image

* fix: use default value of TargetPort

* feat: override command

* fix format
  • Loading branch information
Victoremepunto authored Oct 28, 2024
1 parent 9f6fb2b commit efaaafa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion controllers/cloud.redhat.com/providers/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/RedHatInsights/rhc-osdk-utils/utils"
)

var DefaultImageCaddySideCar = "quay.io/cloudservices/crc-caddy-plugin:27d4bb0"
var DefaultImageCaddySideCar = "quay.io/redhat-services-prod/hcm-eng-prod-tenant/crc-caddy-plugin:e9fdc0a"
var DefaultImageCaddyGateway = DefaultImageCaddySideCar
var DefaultImageMBOP = "quay.io/cloudservices/mbop:4fbb291"
var DefaultImageMocktitlements = "quay.io/cloudservices/mocktitlements:2d55a98"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func makeWebGatewayDeployment(o obj.ClowdObject, objMap providers.ObjectMap, _ b
SuccessThreshold: 1,
FailureThreshold: 3,
}

command := []string{"caddy", "run", "--config", "/etc/caddy/Caddyfile.json"}
c := core.Container{
Name: nn.Name,
Ports: ports,
Expand Down Expand Up @@ -399,6 +399,7 @@ func makeWebGatewayDeployment(o obj.ClowdObject, objMap providers.ObjectMap, _ b
MountPath: "/certs",
},
},
Command: command,
}

dd.Spec.Template.Spec.Volumes = []core.Volume{
Expand Down Expand Up @@ -426,10 +427,9 @@ func makeWebGatewayDeployment(o obj.ClowdObject, objMap providers.ObjectMap, _ b
dd.Spec.Template.SetLabels(labels)

servicePorts := []core.ServicePort{{
Name: "gateway",
Port: port,
Protocol: "TCP",
TargetPort: intstr.FromInt(int(port)),
Name: "gateway",
Port: port,
Protocol: "TCP",
}}

utils.MakeService(svc, nn, labels, servicePorts, o, false)
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/test-ephemeral-gateway/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
annotations:
clowder/authsidecar-config: caddy-config-mocktitlements
clowder/authsidecar-enabled: "true"
clowder/authsidecar-image: quay.io/cloudservices/crc-caddy-plugin:27d4bb0
clowder/authsidecar-image: quay.io/redhat-services-prod/hcm-eng-prod-tenant/crc-caddy-plugin:e9fdc0a
clowder/authsidecar-port: "8090"
spec:
containers:
Expand Down
4 changes: 2 additions & 2 deletions tests/kuttl/test-ephemeral-gateway/03-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
clowder/authsidecar-config: caddy-config-puptoo-processor
clowder/authsidecar-enabled: "true"
clowder/authsidecar-port: "8000"
clowder/authsidecar-image: quay.io/cloudservices/crc-caddy-plugin:27d4bb0
clowder/authsidecar-image: quay.io/redhat-services-prod/hcm-eng-prod-tenant/crc-caddy-plugin:e9fdc0a
spec:
serviceAccountName: puptoo-processor
status:
Expand All @@ -36,7 +36,7 @@ spec:
clowder/authsidecar-config: caddy-config-puptoo-2paths-processor
clowder/authsidecar-enabled: "true"
clowder/authsidecar-port: "8000"
clowder/authsidecar-image: quay.io/cloudservices/crc-caddy-plugin:27d4bb0
clowder/authsidecar-image: quay.io/redhat-services-prod/hcm-eng-prod-tenant/crc-caddy-plugin:e9fdc0a
spec:
serviceAccountName: puptoo-2paths-processor
status:
Expand Down

0 comments on commit efaaafa

Please sign in to comment.