apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: geospatial-data-converter-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: geospatial-data-converter | |
template: | |
metadata: | |
labels: | |
app: geospatial-data-converter | |
spec: | |
containers: | |
- name: geospatial-data-converter | |
image: joshuasundance/geospatial-data-converter:1.0.1 | |
imagePullPolicy: Always | |
resources: | |
requests: | |
cpu: "100m" | |
memory: "200Mi" | |
limits: | |
cpu: "500m" | |
memory: "500Mi" | |
securityContext: | |
runAsNonRoot: true | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: geospatial-data-converter-service | |
# configure on Azure and uncomment below to use a vnet | |
# annotations: | |
# service.beta.kubernetes.io/azure-load-balancer-internal: "true" | |
# service.beta.kubernetes.io/azure-load-balancer-ipv4: vnet.ip.goes.here | |
# service.beta.kubernetes.io/azure-dns-label-name: "geospatial-data-converter" | |
spec: | |
selector: | |
app: geospatial-data-converter | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 7860 | |
type: LoadBalancer | |
apiVersion: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: geospatial-data-converter-network-policy | |
spec: | |
podSelector: | |
matchLabels: | |
app: geospatial-data-converter | |
policyTypes: | |
- Ingress | |
ingress: | |
- from: [] # An empty array here means it will allow traffic from all sources. | |
ports: | |
- protocol: TCP | |
port: 7860 | |