Skip to content

Commit 9bdecf9

Browse files
pjaakap-elmo
andauthored
feat: Add TopologySpreadConstraint and PodDistruptionBudget support (#47)
Added an option to enable a PodDistruptionBudget for the relay deployment. In the values file you can specify a maxUnavailable or a minAvailable, but can't specify both. If both are specified the maxUnavailable takes precedence. If you enabled the PDB but don't specify any max or min values then minAvailable will be set with a value of 0. Tests have been added to cover these cases Adds an option to specify multiple TopologySpreadConstraints in the values file which will be used by the relay deployment. If you don't specify LabelSelector in the values it will use the default selectorLabels from the template which is recommended. Co-authored-by: Aaron Pejakovic <aaron.pejakovic@elmosoftware.com.au>
1 parent 578d4ae commit 9bdecf9

File tree

9 files changed

+370
-553
lines changed

9 files changed

+370
-553
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Basic [installation](#installation) and [configuration](#configuration-options)
88

99
To learn more, read the [Getting started](./docs/getting-started.md) guide. For additional examples, read:
1010

11-
* [Offline mode](./docs/examples/offline-mode.md)
12-
* [Automatic configuration](./docs/examples/automatic-configuration.md)
11+
- [Offline mode](./docs/examples/offline-mode.md)
12+
- [Automatic configuration](./docs/examples/automatic-configuration.md)
1313

1414
## LaunchDarkly overview
1515

@@ -36,9 +36,8 @@ To customize this Helm chart, override the configuration options defined in the
3636

3737
Here's a summary of the available configuration options:
3838

39-
4039
| Key | Type | Default | Description |
41-
|-----------------------------------------------|---------|--------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
40+
| --------------------------------------------- | ------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- |
4241
| relay.environment | object | `{}` | Defines container environment variables to configure the Relay Proxy instance (via ConfigMap) |
4342
| relay.environmentVariables | array | `[]` | Defines container environment variables to configure the Relay Proxy instance (via container spec) |
4443
| relay.envFromSecret | string | `null` | Defines container environment variables to configure the Relay Proxy instance (via existing k8s secrets) |
@@ -79,6 +78,10 @@ Here's a summary of the available configuration options:
7978
| nodeSelector | object | `{}` | Selector to target node placement for the relay pod |
8079
| tolerations | array | `[]` | Specify pod tolerations |
8180
| affinity | object | `{}` | Specify pod affinity |
81+
| pod.distruptionBudget.enabled | boolean | `false` | Enabled podDistruptionBudget |
82+
| pod.distruptionBudget.minAvailable | string | `""` | Minimum number of pods that are available after eviction as number or percentage |
83+
| pod.distruptionBudget.maxUnavailable | string | `""` | Maximum number of pods that are unavailable after eviction as number or percentage |
84+
| pod.topologySpreadConstraints | array | `[]` | Specify the topology spread constrait definitions to apply to the relay deployment |
8285

8386
## Learn more
8487

@@ -90,14 +93,14 @@ We encourage pull requests and other contributions from the community. Check out
9093

9194
## About LaunchDarkly
9295

93-
* LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
94-
* Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
95-
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
96-
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
97-
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
98-
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
99-
* Explore LaunchDarkly
100-
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
101-
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
102-
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
103-
* [launchdarkly.com/blog](https://launchdarkly.com/blog/ "LaunchDarkly Blog Documentation") for the latest product updates
96+
- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
97+
- Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
98+
- Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
99+
- Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
100+
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
101+
- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
102+
- Explore LaunchDarkly
103+
- [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
104+
- [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
105+
- [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
106+
- [launchdarkly.com/blog](https://launchdarkly.com/blog/ "LaunchDarkly Blog Documentation") for the latest product updates

go.mod

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,67 @@ module ld-relay-helm
33
go 1.18
44

55
require (
6-
github.com/gruntwork-io/terratest v0.40.20
7-
github.com/stretchr/testify v1.8.0
8-
k8s.io/api v0.20.6
6+
github.com/gruntwork-io/terratest v0.43.6
7+
github.com/stretchr/testify v1.8.1
8+
k8s.io/api v0.27.2
99
)
1010

1111
require (
12-
cloud.google.com/go v0.83.0 // indirect
13-
github.com/aws/aws-sdk-go v1.40.56 // indirect
12+
github.com/aws/aws-sdk-go v1.44.122 // indirect
1413
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
1514
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
1615
github.com/davecgh/go-spew v1.1.1 // indirect
17-
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
16+
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
1817
github.com/ghodss/yaml v1.0.0 // indirect
1918
github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 // indirect
20-
github.com/go-logr/logr v0.2.0 // indirect
19+
github.com/go-logr/logr v1.2.3 // indirect
20+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
21+
github.com/go-openapi/jsonreference v0.20.1 // indirect
22+
github.com/go-openapi/swag v0.22.3 // indirect
2123
github.com/go-sql-driver/mysql v1.4.1 // indirect
2224
github.com/gogo/protobuf v1.3.2 // indirect
23-
github.com/golang/protobuf v1.5.2 // indirect
25+
github.com/golang/protobuf v1.5.3 // indirect
26+
github.com/google/gnostic v0.5.7-v3refs // indirect
27+
github.com/google/go-cmp v0.5.9 // indirect
2428
github.com/google/gofuzz v1.1.0 // indirect
25-
github.com/google/uuid v1.2.0 // indirect
26-
github.com/googleapis/gnostic v0.4.1 // indirect
29+
github.com/google/uuid v1.3.0 // indirect
2730
github.com/gruntwork-io/go-commons v0.8.0 // indirect
2831
github.com/hashicorp/errwrap v1.0.0 // indirect
2932
github.com/hashicorp/go-multierror v1.1.0 // indirect
3033
github.com/imdario/mergo v0.3.11 // indirect
3134
github.com/jmespath/go-jmespath v0.4.0 // indirect
32-
github.com/json-iterator/go v1.1.11 // indirect
35+
github.com/josharian/intern v1.0.0 // indirect
36+
github.com/json-iterator/go v1.1.12 // indirect
37+
github.com/mailru/easyjson v0.7.7 // indirect
3338
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect
3439
github.com/mitchellh/go-homedir v1.1.0 // indirect
40+
github.com/moby/spdystream v0.2.0 // indirect
3541
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
36-
github.com/modern-go/reflect2 v1.0.1 // indirect
42+
github.com/modern-go/reflect2 v1.0.2 // indirect
43+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3744
github.com/pmezard/go-difflib v1.0.0 // indirect
3845
github.com/pquerna/otp v1.2.0 // indirect
3946
github.com/russross/blackfriday/v2 v2.1.0 // indirect
4047
github.com/spf13/pflag v1.0.5 // indirect
4148
github.com/urfave/cli v1.22.2 // indirect
4249
golang.org/x/crypto v0.1.0 // indirect
43-
golang.org/x/net v0.7.0 // indirect
44-
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
45-
golang.org/x/sys v0.5.0 // indirect
46-
golang.org/x/term v0.5.0 // indirect
47-
golang.org/x/text v0.7.0 // indirect
48-
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
50+
golang.org/x/net v0.8.0 // indirect
51+
golang.org/x/oauth2 v0.1.0 // indirect
52+
golang.org/x/sys v0.6.0 // indirect
53+
golang.org/x/term v0.6.0 // indirect
54+
golang.org/x/text v0.8.0 // indirect
55+
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
4956
google.golang.org/appengine v1.6.7 // indirect
50-
google.golang.org/protobuf v1.26.0 // indirect
57+
google.golang.org/protobuf v1.31.0 // indirect
5158
gopkg.in/inf.v0 v0.9.1 // indirect
5259
gopkg.in/yaml.v2 v2.4.0 // indirect
5360
gopkg.in/yaml.v3 v3.0.1 // indirect
54-
k8s.io/apimachinery v0.20.6 // indirect
55-
k8s.io/client-go v0.20.6 // indirect
56-
k8s.io/klog/v2 v2.4.0 // indirect
57-
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
58-
sigs.k8s.io/structured-merge-diff/v4 v4.0.3 // indirect
59-
sigs.k8s.io/yaml v1.2.0 // indirect
61+
k8s.io/apimachinery v0.27.2 // indirect
62+
k8s.io/client-go v0.27.2 // indirect
63+
k8s.io/klog/v2 v2.90.1 // indirect
64+
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
65+
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
66+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
67+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
68+
sigs.k8s.io/yaml v1.3.0 // indirect
6069
)

0 commit comments

Comments
 (0)