diff --git a/README.md b/README.md index 4eae1e2..d35065b 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,14 @@ FORKED FROM https://github.com/hotheadhacker/no-as-a-service +## local modifications +- answer on / instead of /no +- add /health endpoint for kube readiness probe +- add Dockerfile to build this sh*t +- kustomization in [deploy](deploy) directory (use your own registry) - +## intro

No-as-a-Service Banner diff --git a/deploy/deploy.yaml b/deploy/deploy.yaml new file mode 100644 index 0000000..30d6669 --- /dev/null +++ b/deploy/deploy.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: noaas + name: noaas +spec: + replicas: 2 + selector: + matchLabels: + app: noaas + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: noaas + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + containers: + - image: noaas + imagePullPolicy: IfNotPresent + name: noaas + ports: + - containerPort: 3000 + name: http + readinessProbe: + httpGet: + path: /health + port: 3000 + resources: + limits: + cpu: 1 + memory: 128Mi + requests: + cpu: 10m + memory: 50Mi + securityContext: + readOnlyRootFilesystem: true diff --git a/deploy/ingress.yaml b/deploy/ingress.yaml new file mode 100644 index 0000000..2dd3b25 --- /dev/null +++ b/deploy/ingress.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + creationTimestamp: null + name: noaas +spec: + rules: + - host: no.parano.ch + http: + paths: + - backend: + service: + name: noaas + port: + name: http + path: / + pathType: Prefix + tls: + - hosts: + - no.parano.ch + secretName: noaas-tls diff --git a/deploy/kustomization.yaml b/deploy/kustomization.yaml new file mode 100644 index 0000000..17ae0c9 --- /dev/null +++ b/deploy/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: noaas +resources: +- namespace.yaml +- deploy.yaml +- service.yaml +- ingress.yaml +images: +- name: noaas + newName: /library/no-as-a-service + newTag: v0.0.5 diff --git a/deploy/namespace.yaml b/deploy/namespace.yaml new file mode 100644 index 0000000..69bc4ca --- /dev/null +++ b/deploy/namespace.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Namespace +metadata: + creationTimestamp: null + name: noaas +spec: {} +status: {} diff --git a/deploy/service.yaml b/deploy/service.yaml new file mode 100644 index 0000000..ad5c226 --- /dev/null +++ b/deploy/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app: noaas + name: noaas +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + selector: + app: noaas + type: ClusterIP