clean-engineer-75963
10/04/2019, 11:18 PMpulumi up
.{
"name": "VAULT_REDIRECT_ADDR",
"valueFrom:": {
"configMapKeyRef": {
"name": "config",
"key": "vault-addr",
}
},
},
"valueFrom:"
just a silly typo.pulumi up
worked fine, and what I ended up with was an empty env var in my pod.spec:
containers:
- env:
- name: VAULT_REDIRECT_ADDR
affinity
statement out into a function.def 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>",
},
],
},
}
}
vault_deployment = appsv1.Deployment(
"vault",
spec={
"affinity": self_antiaffinity(namespace, "vault")
}
)
"affinity"
key, so I end up with nested {"affinity": {"affinity": ...}}
, which is incorrect.pulumi up
worked, and what I actually got in my spec was affinity: {}
.creamy-potato-29402
10/04/2019, 11:24 PMclean-engineer-75963
10/04/2019, 11:25 PMcreamy-potato-29402
10/04/2019, 11:25 PM