Skip to content

Commit

Permalink
feat: Setup-azure-core-dns (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolagospagopa authored Oct 12, 2023
1 parent aeeee98 commit 48998d9
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/beta-docker-branch.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Beta docker on dev branch
name: Beta docker release on dev branch

on:
push:
Expand Down
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM python:3.10-alpine
FROM coredns/coredns:1.11.1@sha256:2169b3b96af988cf69d7dd69efbcc59433eb027320eb185c6110e0850b997870

WORKDIR /code
COPY ./core-dns/Corefile /app/conf/Corefile

COPY ./requirements.txt /code/requirements.txt
EXPOSE 53 53/udp

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

COPY ./app /code/app

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
ENTRYPOINT ["/coredns"]
CMD ["-conf", "/app/conf/Corefile"]
35 changes: 6 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,13 @@
# devops-app-status
# azure-core-dns

## Goal

A simple http server that allow to test basic endpoint to verify that kubernetes and the namespace are reacheble:
have a complete core dns image with all the configuration, to work inside azure, as dns forwarder for private connections

endpoints exposed:
## How to use

* `/`
* `/status`
* `/health`
* `/healthz`
Run container and connect througth port 53 (TCP/UDP)

## How to release (manually)
## Tests

go to the helm folder like `helm/selfcare/pnpg`

### Init helm

```sh
helm dep update
```

### Install helm package

```sh
helm upgrade -i -n <namespace> -f <values file name> <helm app name> \.

helm upgrade -i -n idpay -f values-dev.yaml devops-java-springboot-color \.
```

## Special thanks

This project born from the fantastic tutorial created by the Biella python group.

<https://github.com/PythonBiellaGroup/FastCash>
Use `docker compose up` to test the dockerfile
1 change: 1 addition & 0 deletions core-dns/Corefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.:53 {
errors
log
ready
health
forward . 168.63.129.16
Expand Down
16 changes: 9 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
version: "3.8"
services:
status:
build:
dockerfile: ./Dockerfile
context: .
container_name: status
restart: always
azure-core-dns:
# image: ghcr.io/pagopa/azure-core-dns:beta-setup-azure-core-dns
image: azurecoredns:latest
# build:
# dockerfile: ./Dockerfile
# context: .
container_name: azure-core-dns
# restart: always
ports:
- "8000:8000"
- "53:53"
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions zforce-release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1

0 comments on commit 48998d9

Please sign in to comment.