Skip to content

Commit

Permalink
UPDATE: workflow files and seperate deployment to gcp clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremiahUy committed Oct 5, 2020
1 parent d47fa11 commit a6ddcc0
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 23 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
if: github.ref == 'refs/heads/master' && github.event_name != 'release'
strategy:
matrix:
cluster: ["dev-sbs", "dev-gcp", "dev-fss", "labs-gcp"]
cluster: ["dev-sbs", "dev-fss"]
timeout-minutes: 2
steps:
- name: Checkout
Expand All @@ -64,13 +64,32 @@ jobs:
RESOURCE: naiserator.yml,network_policy.yml
VARS: .nais/${{ matrix.cluster }}.json

deploy-dev-labs-gcp:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master' && github.event_name != 'release'
strategy:
matrix:
cluster: [ "dev-gcp", "labs-gcp" ]
timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@master
- name: Deploy to ${{ matrix.cluster }}
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_KEY }}
CLUSTER: ${{ matrix.cluster }}
RESOURCE: naiserator-gcp.yml,network_policy.yml
VARS: .nais/${{ matrix.cluster }}.json

deploy-prod:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
strategy:
matrix:
cluster: ["prod-sbs", "prod-gcp", "prod-fss"]
cluster: ["prod-sbs", "prod-fss"]
timeout-minutes: 2
steps:
- name: Checkout
Expand All @@ -82,3 +101,19 @@ jobs:
CLUSTER: ${{ matrix.cluster }}
RESOURCE: naiserator.yml,network_policy.yml
VARS: .nais/${{ matrix.cluster }}.json

deploy-prod-gcp:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@master
- name: Deploy to prod-gcp
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_KEY }}
CLUSTER: prod-gcp
RESOURCE: naiserator.yml,network_policy.yml
VARS: .nais/prod-gcp.json
3 changes: 1 addition & 2 deletions .nais/dev-fss.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"namespace": "default",
"pool": "nav-dev",
"webproxy": "true",
"no_proxy": "localhost,127.0.0.1,10.254.0.1,.local,.adeo.no,.nav.no,.aetat.no,.devillo.no,.oera.no"
"proxy": "https://webproxy.nais:8088"
}
4 changes: 1 addition & 3 deletions .nais/dev-gcp.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"namespace": "dataplattform",
"pool": "nav-dev",
"webproxy": "false",
"no_proxy": ".nav.no"
"pool": "nav-dev"
}
3 changes: 1 addition & 2 deletions .nais/dev-sbs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"namespace": "default",
"pool": "nav-dev",
"webproxy": "true",
"no_proxy": "localhost,127.0.0.1,10.254.0.1,.local,.adeo.no,.nav.no,.aetat.no,.devillo.no,.oera.no"
"proxy": "https://webproxy.nais:8088"
}
4 changes: 1 addition & 3 deletions .nais/labs-gcp.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"namespace": "dataplattform",
"pool": "nav-dev",
"webproxy": "false",
"no_proxy": ".nav.no"
"pool": "nav-dev"
}
3 changes: 1 addition & 2 deletions .nais/prod-fss.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"namespace": "default",
"pool": "nav-prod",
"webproxy": "true",
"no_proxy": "localhost,127.0.0.1,10.254.0.1,.local,.adeo.no,.nav.no,.aetat.no,.devillo.no,.oera.no"
"proxy": "https://webproxy.nais:8088"
}
4 changes: 1 addition & 3 deletions .nais/prod-gcp.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"namespace": "dataplattform",
"pool": "nav-prod",
"webproxy": "false",
"no_proxy": ".nav.no"
"pool": "nav-prod"
}
3 changes: 1 addition & 2 deletions .nais/prod-sbs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"namespace": "default",
"pool": "nav-prod",
"webproxy": "true",
"no_proxy": "localhost,127.0.0.1,10.254.0.1,.local,.adeo.no,.nav.no,.aetat.no,.devillo.no,.oera.no"
"proxy": "https://webproxy.nais:8088"
}
47 changes: 47 additions & 0 deletions naiserator-gcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: "nais.io/v1alpha1"
kind: "Application"
metadata:
labels:
team: dataplattform
name: ingress-collector
namespace: dataplattform
spec:
image: {{image}}
port: 8000
prometheus:
enabled: false
path: /metrics
istio:
enabled: false
liveness:
path: /is-alive
timeout: 2
initialDelay: 2
periodSeconds: 7
failureThreshold: 3
readiness:
path: /is-ready
timeout: 2
initialDelay: 2
periodSeconds: 7
failureThreshold: 3
replicas:
min: 1
max: 1
resources:
limits:
cpu: 200m
memory: 128Mi
requests:
cpu: 100m
memory: 64Mi
webproxy: {{webproxy}}
env:
- name: WEB_CONCURRENCY
value: "1"
- name: ACCESS_LOG
value: ""
- name: REQUESTS_CA_BUNDLE
value: /etc/pki/tls/certs/ca-bundle.crt
- name: SSL_CERT_FILE
value: /etc/pki/tls/certs/ca-bundle.crt
12 changes: 8 additions & 4 deletions naiserator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ spec:
value: /etc/pki/tls/certs/ca-bundle.crt
- name: SSL_CERT_FILE
value: /etc/pki/tls/certs/ca-bundle.crt
- name: NO_PROXY
value: {{no_proxy}}
- name: no_proxy
value: {{no_proxy}}
- name: HTTPS_PROXY
value: {{proxy}}
- name: HTTP_PROXY
value: {{proxy}}
- name: https_proxy
value: {{proxy}}
- name: http_proxy
value: {{proxy}}

0 comments on commit a6ddcc0

Please sign in to comment.