diff --git a/_apps/ipapi.yaml b/_apps/ipapi.yaml new file mode 100644 index 0000000..1d7927a --- /dev/null +++ b/_apps/ipapi.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ipapi + namespace: ipapi + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: ipapi + server: https://kubernetes.default.svc + project: default + source: + path: ipapi + repoURL: https://git.tbrnt.ch/tobru/gitops-tbrnt.git + targetRevision: HEAD +--- +apiVersion: v1 +kind: Namespace +metadata: + name: ipapi diff --git a/ipapi/deployment.yaml b/ipapi/deployment.yaml new file mode 100644 index 0000000..7955ab6 --- /dev/null +++ b/ipapi/deployment.yaml @@ -0,0 +1,37 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: ipapi + name: ipapi + namespace: ipapi +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 2 + selector: + matchLabels: + component: ipapi + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + component: ipapi + spec: + containers: + - image: docker.io/mpolden/echoip:latest + imagePullPolicy: Always + name: ipapi + ports: + - containerPort: 8080 + name: http + protocol: TCP + dnsPolicy: ClusterFirst + restartPolicy: Always + securityContext: {} + terminationGracePeriodSeconds: 30 diff --git a/ipapi/ingress.yaml b/ipapi/ingress.yaml new file mode 100644 index 0000000..aee6048 --- /dev/null +++ b/ipapi/ingress.yaml @@ -0,0 +1,23 @@ +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + ingress.kubernetes.io/ssl-redirect: "true" + labels: + app: ipapi + name: ipapi + namespace: ipapi +spec: + rules: + - host: ip.tbrnt.ch + http: + paths: + - backend: + serviceName: ipapi + servicePort: 8080 + tls: + - hosts: + - ip.tbrnt.ch + secretName: ipapi-tbrnt-ch-cert diff --git a/ipapi/service.yaml b/ipapi/service.yaml new file mode 100644 index 0000000..d928536 --- /dev/null +++ b/ipapi/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: ipapi + name: ipapi + namespace: ipapi +spec: + ports: + - name: http + port: 8080 + targetPort: 8080 + selector: + app: ipapi