Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of add probes now that expose paths are supported into release/1.3.x #3111

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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