Skip to content

Commit

Permalink
chore: deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Feb 22, 2024
1 parent d9a91db commit 58a2a9d
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,17 @@ jobs:
images: rss3/blackbox-hd
context: .
dockerfile: ./Dockerfile
secrets: inherit
deploy-prod:
uses: NaturalSelectionLabs/Daedalus/.github/workflows/deploy-v3-tpl.yaml@main
needs:
- build
with:
images: rss3/blackbox-hd
tag: sha-${{ github.sha }}
cluster: prod
namespace: guardian
releaseName: blackbox-http-discovery
revision: main
dir: deploy/prod
secrets: inherit
12 changes: 12 additions & 0 deletions deploy/prod/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
endpoint:
- address: asia-east2-naturalselectionlabs.cloudfunctions.net:443
geohash: 85bnbn0p2j8p8
name: HongKong
- address: europe-west1-naturalselectionlabs.cloudfunctions.net:443
geohash: u0gvph1m9bbqh
name: Belgium
target:
- module: http_2xx
url: https://rss3.io
- module: http_2xx
url: https://crossbell.io
38 changes: 38 additions & 0 deletions deploy/prod/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: blackbox-http-discovery
spec:
replicas: 3
selector:
matchLabels:
app: blackbox-http-discovery
template:
metadata:
labels:
app: blackbox-http-discovery
spec:
# serviceAccountName: httpbin
containers:
- image: rss3/blackbox-hd
imagePullPolicy: IfNotPresent
name: server
args:
- --config
- /etc/blackbox-hd/config.yaml
ports:
- containerPort: 8000
resources:
requests:
cpu: '0.1'
memory: 64Mi
limits:
cpu: '0.5'
memory: 128Mi
volumeMounts:
- mountPath: /etc/blackbox-hd
name: config
volumes:
- name: config
configMap:
name: blackbox-http-discovery
9 changes: 9 additions & 0 deletions deploy/prod/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deploy.yaml
- svc.yaml
configMapGenerator:
- name: blackbox-http-discovery
files:
- config.yaml
12 changes: 12 additions & 0 deletions deploy/prod/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: blackbox-http-discovery
spec:
selector:
app: blackbox-http-discovery
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: ClusterIP

0 comments on commit 58a2a9d

Please sign in to comment.