Skip to content

Commit

Permalink
add probes now that expose paths are supported
Browse files Browse the repository at this point in the history
  • Loading branch information
ndhanushkodi committed Oct 17, 2023
1 parent 2b0ef6a commit 7a279d9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 30 deletions.
49 changes: 24 additions & 25 deletions acceptance/tests/fixtures/bases/v2-multiport-app/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ spec:
ports:
- containerPort: 8080
name: web
# livenessProbe:
# httpGet:
# port: 8080
# initialDelaySeconds: 1
# failureThreshold: 1
# periodSeconds: 1
# startupProbe:
# httpGet:
# port: 8080
# initialDelaySeconds: 1
# failureThreshold: 30
# periodSeconds: 1
livenessProbe:
httpGet:
port: 8080
initialDelaySeconds: 1
failureThreshold: 1
periodSeconds: 1
startupProbe:
httpGet:
port: 8080
initialDelaySeconds: 1
failureThreshold: 30
periodSeconds: 1
readinessProbe:
exec:
command: ['sh', '-c', 'test ! -f /tmp/unhealthy-multiport']
Expand All @@ -59,19 +59,18 @@ spec:
# This name is meant to be used alongside the _numeric_ K8s service target port
# to verify that we can still route traffic to the named port when there's a mismatch.
name: admin
# TODO: (v2/nitya) add these probes back when expose paths and L7 are supported.
# livenessProbe:
# httpGet:
# port: 9090
# initialDelaySeconds: 1
# failureThreshold: 1
# periodSeconds: 1
# startupProbe:
# httpGet:
# port: 9090
# initialDelaySeconds: 1
# failureThreshold: 30
# periodSeconds: 1
livenessProbe:
httpGet:
port: 9090
initialDelaySeconds: 1
failureThreshold: 1
periodSeconds: 1
startupProbe:
httpGet:
port: 9090
initialDelaySeconds: 1
failureThreshold: 30
periodSeconds: 1
readinessProbe:
exec:
command: ['sh', '-c', 'test ! -f /tmp/unhealthy-multiport-admin']
Expand Down
1 change: 1 addition & 0 deletions acceptance/tests/mesh_v2/mesh_inject_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestMeshInject_MultiportService(t *testing.T) {

helmValues := map[string]string{
"global.experiments[0]": "resource-apis",
"global.image": "ndhanushkodi/consul-dev:expose2",
// The UI is not supported for v2 in 1.17, so for now it must be disabled.
"ui.enabled": "false",
"connectInject.enabled": "true",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,7 @@ func (w *MeshWebhook) consulDataplaneSidecar(namespace corev1.Namespace, pod cor
Args: args,
}

// Omit the readiness probe in transparent proxy mode until expose paths are implemented. Otherwise all probes will fail.
// TODO: (v2/nitya) add probes in tproxy mode when expose paths and L7 are supported.
if !w.EnableTransparentProxy {
container.ReadinessProbe = probe
}
container.ReadinessProbe = probe

if w.AuthMethod != "" {
container.VolumeMounts = append(container.VolumeMounts, saTokenVolumeMount)
Expand Down

0 comments on commit 7a279d9

Please sign in to comment.