fix(deploy): constrain DEV workloads to worker nodes
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m24s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 6s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m24s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 6s
This commit is contained in:
@@ -88,7 +88,15 @@ def route_on(tree):
|
||||
|
||||
|
||||
def enable(tree):
|
||||
append(tree, DEV, 'components:\n - ../dev-session-route\n')
|
||||
import yaml
|
||||
full = os.path.join(tree, DEV)
|
||||
with open(full, encoding='utf-8') as f:
|
||||
data = yaml.safe_load(f)
|
||||
components = data.setdefault('components', [])
|
||||
if '../dev-session-route' not in components:
|
||||
components.append('../dev-session-route')
|
||||
with open(full, 'w', encoding='utf-8') as f:
|
||||
yaml.safe_dump(data, f, sort_keys=False)
|
||||
|
||||
|
||||
def resolve(tree):
|
||||
@@ -103,6 +111,24 @@ def quota_one(tree):
|
||||
|
||||
|
||||
CASES = [
|
||||
('DEV required worker affinity removed', lambda t: inline_patch(
|
||||
t, 'deploy/kubernetes/dev/kustomization.yaml',
|
||||
'- op: remove\n path: /spec/template/spec/affinity\n',
|
||||
{'kind': 'Deployment', 'name': 'evo-region'}), 'must exclude control-plane and master'),
|
||||
('DEV affinity has an unrestricted OR term', lambda t: inline_patch(
|
||||
t, 'deploy/kubernetes/dev/kustomization.yaml',
|
||||
'- op: add\n path: /spec/template/spec/affinity/nodeAffinity/'
|
||||
'requiredDuringSchedulingIgnoredDuringExecution/nodeSelectorTerms/-\n'
|
||||
' value: {matchExpressions: [{key: aevolution.io/stores, operator: Exists}]}\n',
|
||||
{'kind': 'Deployment', 'name': 'evo-region'}), 'must exclude control-plane and master'),
|
||||
('DEV direct nodeName bypass', lambda t: inline_patch(
|
||||
t, 'deploy/kubernetes/dev/kustomization.yaml',
|
||||
'- op: add\n path: /spec/template/spec/nodeName\n value: arbitrary-node\n',
|
||||
{'kind': 'Job', 'name': 'aevolution-db-migrate'}), 'must not bypass scheduling with nodeName'),
|
||||
('DEV legacy master exclusion removed', lambda t: edit(
|
||||
t, 'deploy/kubernetes/worker-only-dev/kustomization.yaml',
|
||||
' - {key: node-role.kubernetes.io/master, operator: DoesNotExist}\n',
|
||||
'', 2), 'must exclude control-plane and master'),
|
||||
('non-RFC 1918 VIP without approval', lambda t: edit(t, ROUTE + 'service.yaml', '172.10.1.202',
|
||||
'172.11.1.210'), 'internal address'),
|
||||
# Review M9.8f P1: inline/JSON patches and namespace changes, seen only when rendered.
|
||||
|
||||
Reference in New Issue
Block a user