sparse-intern-71089
10/04/2019, 11:18 PMclean-engineer-75963
10/04/2019, 11:18 PM{
"name": "VAULT_REDIRECT_ADDR",
"valueFrom:": {
"configMapKeyRef": {
"name": "config",
"key": "vault-addr",
}
},
},
clean-engineer-75963
10/04/2019, 11:19 PM"valueFrom:"
just a silly typo.clean-engineer-75963
10/04/2019, 11:19 PMpulumi up
worked fine, and what I ended up with was an empty env var in my pod.clean-engineer-75963
10/04/2019, 11:20 PMspec:
containers:
- env:
- name: VAULT_REDIRECT_ADDR
clean-engineer-75963
10/04/2019, 11:20 PMclean-engineer-75963
10/04/2019, 11:20 PMaffinity
statement out into a function.clean-engineer-75963
10/04/2019, 11:21 PMdef self_antiaffinity(namespace, component):
"""Returns a pod spec affinity block specifying antiaffinity with other pods
with this component."""
return {
"affinity": {
"podAntiAffinity": {
"requiredDuringSchedulingIgnoredDuringExecution": [
{
"labelSelector": {
"matchExpressions": [
{
"key": "component",
"operator": "In",
"values": [
component,
],
},
],
},
"namespaces": [
namespace,
],
"topologyKey": "<http://kubernetes.io/hostname|kubernetes.io/hostname>",
},
],
},
}
}
clean-engineer-75963
10/04/2019, 11:22 PMvault_deployment = appsv1.Deployment(
"vault",
spec={
"affinity": self_antiaffinity(namespace, "vault")
}
)
clean-engineer-75963
10/04/2019, 11:23 PM"affinity"
key, so I end up with nested {"affinity": {"affinity": ...}}
, which is incorrect.clean-engineer-75963
10/04/2019, 11:23 PMpulumi up
worked, and what I actually got in my spec was affinity: {}
.creamy-potato-29402
10/04/2019, 11:24 PMcreamy-potato-29402
10/04/2019, 11:24 PMcreamy-potato-29402
10/04/2019, 11:24 PMclean-engineer-75963
10/04/2019, 11:25 PMcreamy-potato-29402
10/04/2019, 11:25 PMcreamy-potato-29402
10/04/2019, 11:25 PMcreamy-potato-29402
10/04/2019, 11:25 PM