From a5c9a6503701746704fc6a8b69c2da6c3523e1ee Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Fri, 21 May 2021 13:24:08 -0500 Subject: [PATCH] fix: Add EPMD port to kube config --- .gitlab-ci.yml | 2 +- Dockerfile | 2 ++ infrastructure/kube.yaml | 27 +++++++++++++++++++++++++- infrastructure_templates/kube.yaml.dot | 25 ++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec9f6090..0d3aabb7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,7 +53,7 @@ build_image_for_commit: # If tests pass, tag the commit and update package versions deploy_to_tags: stage: deploy_tags - needs: ['test'] + needs: ['test', 'build_image_for_commit'] image: "node:15.0" only: - master diff --git a/Dockerfile b/Dockerfile index 4422d6d9..fd4ec685 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ RUN mix local.hex --force \ && mix local.rebar --force EXPOSE 4000 +# Default EPMD port +EXPOSE 4369 ARG MIX_ENV=prod RUN echo ${MIX_ENV} diff --git a/infrastructure/kube.yaml b/infrastructure/kube.yaml index 86447571..f398e64c 100644 --- a/infrastructure/kube.yaml +++ b/infrastructure/kube.yaml @@ -20,9 +20,10 @@ spec: spec: containers: - name: app - image: registry.gitlab.com/mythic-insight/legendary-doc-site:2.8.8 + image: registry.gitlab.com/mythic-insight/legendary-doc-site:2.8.9 ports: - containerPort: 4000 + - containerPort: 4369 env: - name: HOSTNAME value: legendaryframework.org @@ -130,3 +131,27 @@ spec: - legendaryframework.org - legendaryframework.com secretName: legendary-doc-site-cert +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + namespace: legendary-doc-site + name: pod-watcher +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["list"] +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + namespace: legendary-doc-site + name: pod-watcher-binding +subjects: +- kind: ServiceAccount + namespace: legendary-doc-site + name: default +roleRef: + kind: Role + name: pod-watcher + apiGroup: rbac.authorization.k8s.io diff --git a/infrastructure_templates/kube.yaml.dot b/infrastructure_templates/kube.yaml.dot index da555131..ab2d0bcf 100644 --- a/infrastructure_templates/kube.yaml.dot +++ b/infrastructure_templates/kube.yaml.dot @@ -23,6 +23,7 @@ spec: image: registry.gitlab.com/mythic-insight/legendary-doc-site:{{=it.version}} ports: - containerPort: 4000 + - containerPort: 4369 env: - name: HOSTNAME value: legendaryframework.org @@ -130,3 +131,27 @@ spec: - legendaryframework.org - legendaryframework.com secretName: legendary-doc-site-cert +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + namespace: legendary-doc-site + name: pod-watcher +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["list"] +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + namespace: legendary-doc-site + name: pod-watcher-binding +subjects: +- kind: ServiceAccount + namespace: legendary-doc-site + name: default +roleRef: + kind: Role + name: pod-watcher + apiGroup: rbac.authorization.k8s.io