diff options
| author | Max Audron <audron@cocaine.farm> | 2021-06-05 00:11:36 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-06-05 00:11:36 +0200 |
| commit | e53976d33c7611991c8a33344fd2f73211096c6e (patch) | |
| tree | 0a3bb657711cbd5602931fd4746c1101b8c0a47b /deploy/environments/production | |
| parent | remove tanka vendoring (diff) | |
ready tanka deploy for CI
Diffstat (limited to 'deploy/environments/production')
| -rw-r--r-- | deploy/environments/production/main.jsonnet | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/deploy/environments/production/main.jsonnet b/deploy/environments/production/main.jsonnet new file mode 100644 index 0000000..175fbab --- /dev/null +++ b/deploy/environments/production/main.jsonnet @@ -0,0 +1,40 @@ +local k = import 'ksonnet-util/kausal.libsonnet'; +local util = import 'util/main.libsonnet'; + +function(tag, namespace, envSlug=null, projectPathSlug=null) + (util.inlineSpec('https://control.kube.cat:6443', namespace, envSlug, projectPathSlug)) + + { + _config:: self.data._config, + catinator:: self.data.catinator, + data: (import 'catinator.libsonnet') + { + _config+:: { + catinator+: { + image+: { + tag: tag, + }, + config: importstr '../../../config.toml', + }, + }, + catinator+: { + local egress = util.cilium.egressNatPolicy, + local statefulset = k.apps.v1.statefulSet, + local container = k.core.v1.container, + + statefulset+: + statefulset.spec.template.spec.withInitContainers([ + container.new('waitForEgress', 'docker.io/busybox:latest') + + container.withCommand(['/bin/sleep', '30']), + ]), + + egress: + egress.new('catinator') + + egress.withEgressSourceIP('178.63.224.13') + + egress.withDestinationCIDRs(['0.0.0.0/0']) + + egress.withPodSelector( + egress.podSelector.withMatchLabels({ + 'io.kubernetes.pod.namespace': namespace, + }) + ), + }, + }, + } |
