Skip to content

Commit

Permalink
Add custom dns manifests needed to connect to infra
Browse files Browse the repository at this point in the history
Signed-off-by: tssala23 <[email protected]>
  • Loading branch information
tssala23 committed Jan 6, 2025
1 parent a6290fb commit ea6e6cc
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 0 deletions.
24 changes: 24 additions & 0 deletions custom-dns/base/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: dns-config
namespace: custom-dns
data:
Corefile: |
nerc-ocp-infra.rc.fas.harvard.edu:8053 {
log stdout
file /etc/coredns/nerc-ocp-infra.rc.fas.harvard.edu
}
nerc-ocp-infra.rc.fas.harvard.edu: |
$TTL 1800
$ORIGIN nerc-ocp-infra.rc.fas.harvard.edu.
@ IN SOA dns domains (
2020031101 ; serial
300 ; refresh
1800 ; retry
14400 ; expire
300 ) ; minimum
api IN A 10.30.9.5
*.apps IN A 10.30.9.6
39 changes: 39 additions & 0 deletions custom-dns/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: dns
labels:
app: dns
spec:
replicas: 1
selector:
matchLabels:
app: dns
deployment: dns
template:
metadata:
labels:
app: dns
deployment: dns
spec:
containers:
- name: coredns-openshift
image: quay.io/openshift/origin-coredns:4.16
command: ["/usr/bin/coredns"]
args: ["-dns.port","8053","-conf","/etc/coredns/Corefile"]

Check failure on line 23 in custom-dns/base/deployment.yaml

View workflow job for this annotation

GitHub Actions / run-linters / run-linters

23:28 [commas] too few spaces after comma

Check failure on line 23 in custom-dns/base/deployment.yaml

View workflow job for this annotation

GitHub Actions / run-linters / run-linters

23:35 [commas] too few spaces after comma

Check failure on line 23 in custom-dns/base/deployment.yaml

View workflow job for this annotation

GitHub Actions / run-linters / run-linters

23:43 [commas] too few spaces after comma
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- ALL
runAsNonRoot: true
volumeMounts:
- mountPath: /etc/coredns
name: dns-config
volumes:
- configMap:
defaultMode: 420
name: dns-config
name: dns-config
7 changes: 7 additions & 0 deletions custom-dns/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- configmap.yaml
- dsplyment.yaml
- Service.yaml
4 changes: 4 additions & 0 deletions custom-dns/base/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: custom-dns
19 changes: 19 additions & 0 deletions custom-dns/base/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: dns
name: dns
spec:
ports:
- name: 8053-tcp
port: 8053
protocol: TCP
targetPort: 8053
- name: 8053-udp
port: 8053
protocol: UDP
targetPort: 8053
selector:
app: dns
deployment: dns

0 comments on commit ea6e6cc

Please sign in to comment.