Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4029 from shalier/addRetryPolicyFlag
Browse files Browse the repository at this point in the history
feat(*): adds feature flag for retry policy
  • Loading branch information
shalier authored Aug 24, 2021
2 parents 928bd1a + a09d998 commit c05c35a
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions charts/osm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ The following table lists the configurable parameters of the osm chart and their
| OpenServiceMesh.featureFlags.enableEnvoyActiveHealthChecks | bool | `false` | Enable Envoy active health checks |
| OpenServiceMesh.featureFlags.enableIngressBackendPolicy | bool | `true` | Enables OSM's IngressBackend policy API. When enabled, OSM will use the IngressBackend API allow ingress traffic to mesh backends |
| OpenServiceMesh.featureFlags.enableMulticlusterMode | bool | `false` | Enable Multicluster mode. When enabled, multicluster mode will be enabled in OSM |
| OpenServiceMesh.featureFlags.enableRetryPolicy | bool | `false` | Enable Retry Policy for automatic request retries |
| OpenServiceMesh.featureFlags.enableSnapshotCacheMode | bool | `false` | Enables SnapshotCache feature for Envoy xDS server. |
| OpenServiceMesh.featureFlags.enableValidatingWebhook | bool | `false` | Enable kubernetes validating webhook |
| OpenServiceMesh.featureFlags.enableWASMStats | bool | `true` | Enable extra Envoy statistics generated by a custom WASM extension |
Expand Down
2 changes: 2 additions & 0 deletions charts/osm/crds/config_meshconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,5 @@ spec:
type: boolean
enableEnvoyActiveHealthChecks:
type: boolean
enableRetryPolicy:
type: boolean
3 changes: 2 additions & 1 deletion charts/osm/templates/preset-mesh-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ data:
"enableAsyncProxyServiceMapping": {{.Values.OpenServiceMesh.featureFlags.enableAsyncProxyServiceMapping}},
"enableValidatingWebhook": {{.Values.OpenServiceMesh.featureFlags.enableValidatingWebhook}},
"enableIngressBackendPolicy": {{.Values.OpenServiceMesh.featureFlags.enableIngressBackendPolicy}},
"enableEnvoyActiveHealthChecks": {{.Values.OpenServiceMesh.featureFlags.enableEnvoyActiveHealthChecks}}
"enableEnvoyActiveHealthChecks": {{.Values.OpenServiceMesh.featureFlags.enableEnvoyActiveHealthChecks}},
"enableRetryPolicy": {{.Values.OpenServiceMesh.featureFlags.enableRetryPolicy}}
}
}
12 changes: 11 additions & 1 deletion charts/osm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,8 @@
"enableValidatingWebhook",
"enableIngressBackendPolicy",
"enableEnvoyActiveHealthChecks",
"enableSnapshotCacheMode"
"enableSnapshotCacheMode",
"enableRetryPolicy"
],
"properties": {
"enableWASMStats": {
Expand Down Expand Up @@ -847,6 +848,15 @@
"examples": [
true
]
},
"enableRetryPolicy": {
"$id": "#/properties/OpenServiceMesh/properties/featureFlags/properties/enableRetryPolicy",
"type": "boolean",
"title": "Enable Retry Policy",
"description": "Enable automatic request retries.",
"examples": [
true
]
}
},
"additionalProperties": false
Expand Down
2 changes: 2 additions & 0 deletions charts/osm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ OpenServiceMesh:
enableEnvoyActiveHealthChecks: false
# -- Enables SnapshotCache feature for Envoy xDS server.
enableSnapshotCacheMode: false
# -- Enable Retry Policy for automatic request retries
enableRetryPolicy: false

# -- OSM multicluster feature configuration
multicluster:
Expand Down
4 changes: 3 additions & 1 deletion cmd/osm-bootstrap/osm-bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ func TestCreateDefaultMeshConfig(t *testing.T) {
"enableValidatingWebhook": false,
"enableIngressBackendPolicy": true,
"enableEnvoyActiveHealthChecks": true,
"enableSnapshotCacheMode": true
"enableSnapshotCacheMode": true,
"enableRetryPolicy": false
}
}`,
},
Expand All @@ -74,6 +75,7 @@ func TestCreateDefaultMeshConfig(t *testing.T) {
assert.Equal(meshConfig.Spec.Certificate.ServiceCertValidityDuration, "23h")
assert.True(meshConfig.Spec.FeatureFlags.EnableIngressBackendPolicy)
assert.True(meshConfig.Spec.FeatureFlags.EnableEnvoyActiveHealthChecks)
assert.False(meshConfig.Spec.FeatureFlags.EnableRetryPolicy)
}

func TestValidateCLIParams(t *testing.T) {
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/config/v1alpha1/mesh_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,7 @@ type FeatureFlags struct {
// EnableEnvoyActiveHealthChecks defines if OSM will Envoy active health
// checks between services allowed to communicate.
EnableEnvoyActiveHealthChecks bool `json:"enableEnvoyActiveHealthChecks,omitempty"`

// EnableRetryPolicy defines if retry policy is enabled.
EnableRetryPolicy bool `json:"enableRetryPolicy,omitempty"`
}

0 comments on commit c05c35a

Please sign in to comment.