Skip to content

Commit

Permalink
Make it possible to disable service links - Close strimzi#4800
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <www@scholzj.com>
  • Loading branch information
scholzj committed Apr 24, 2021
1 parent 5670888 commit 597940e
Show file tree
Hide file tree
Showing 35 changed files with 296 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@
* Changed Reconciliation interval for Topic Operator from 90 to 120 seconds (to keep it the same as for other operators)
* Changed Zookeeper session timeout default value to 18 seconds for Topic and User Operators (for improved resiliency)
* Removed requirement for replicas and partitions KafkaTopic spec making these parameters optional
* Allow disabling service links (environment variables describing Kubernetes services) in Pod template

### Changes, deprecations and removals

Expand Down
Expand Up @@ -52,6 +52,7 @@ public class PodTemplate implements Serializable, UnknownPropertyPreserving {
private String priorityClassName;
private String schedulerName;
private List<HostAlias> hostAliases;
private Boolean enableServiceLinks;
private Map<String, Object> additionalProperties = new HashMap<>(0);

@Description("Metadata applied to the resource.")
Expand Down Expand Up @@ -171,6 +172,16 @@ public void setHostAliases(List<HostAlias> hostAliases) {
this.hostAliases = hostAliases;
}

@Description("Indicates whether information about services should be injected into pod's environment variables.")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public Boolean getEnableServiceLinks() {
return enableServiceLinks;
}

public void setEnableServiceLinks(Boolean enableServiceLinks) {
this.enableServiceLinks = enableServiceLinks;
}

@Override
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Expand Up @@ -1392,6 +1392,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -2422,6 +2426,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -3427,6 +3435,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -4364,6 +4376,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -5121,6 +5137,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -5633,6 +5653,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -8542,6 +8566,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -9928,6 +9956,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -11825,6 +11857,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -12766,6 +12802,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -13527,6 +13567,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -14039,6 +14083,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -16948,6 +16996,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -18334,6 +18386,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -20231,6 +20287,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -21172,6 +21232,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -21933,6 +21997,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -22445,6 +22513,10 @@ spec:
description: The pod's HostAliases. HostAliases is an
optional list of hosts and IPs that will be injected
into the pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down
Expand Up @@ -774,6 +774,10 @@ spec:
description: The pod's HostAliases. HostAliases is an optional
list of hosts and IPs that will be injected into the pod's
hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -1263,6 +1267,10 @@ spec:
description: The pod's HostAliases. HostAliases is an optional
list of hosts and IPs that will be injected into the pod's
hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -2784,6 +2792,10 @@ spec:
description: The pod's HostAliases. HostAliases is an optional
list of hosts and IPs that will be injected into the pod's
hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -3273,6 +3285,10 @@ spec:
description: The pod's HostAliases. HostAliases is an optional
list of hosts and IPs that will be injected into the pod's
hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -4794,6 +4810,10 @@ spec:
description: The pod's HostAliases. HostAliases is an optional
list of hosts and IPs that will be injected into the pod's
hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down Expand Up @@ -5283,6 +5303,10 @@ spec:
description: The pod's HostAliases. HostAliases is an optional
list of hosts and IPs that will be injected into the pod's
hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services
should be injected into pod's environment variables.
topologySpreadConstraints:
type: array
items:
Expand Down

0 comments on commit 597940e

Please sign in to comment.