Commit 22b5796c authored by Simon Cornet's avatar Simon Cornet
Browse files

initial commit

parents
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
# namespace
---
apiVersion: 'v1'
kind: 'Namespace'
metadata:
  name: 'simoncor-net'
+14 −0
Original line number Diff line number Diff line
# secret
---
apiVersion: 'v1'
kind: 'Secret'
type: 'kubernetes.io/dockerconfigjson'
metadata:
  name: 'cr-simoncor-net-login'
  namespace: 'simoncor-net'

data:
  .dockerconfigjson:
    "eyJhdXRocyI6eyJjci5zaW1vbmNvci5uZXQiOnsidXNlcm5hbWUiOiJzaWVtcGllIiwicGFzc3\
     dvcmQiOiJXdXdKdk44VGZrN05VciIsImVtYWlsIjoic2ltb25Ac2ltb25jb3IubmV0IiwiYXV0\
     aCI6ImMybGxiWEJwWlRwWGRYZEtkazQ0Vkdack4wNVZjZz09In19fQ=="
+102 −0
Original line number Diff line number Diff line
# deployment
---
apiVersion: 'apps/v1'
kind: 'Deployment'
metadata:
  name: 'simoncor-net'
  namespace: 'simoncor-net'
  labels:
    app: 'simoncor-net'

spec:
  replicas: 2
  selector:
    matchLabels:
      app: 'simoncor-net'
  template:
    metadata:
      labels:
        app: 'simoncor-net'

    spec:

      # login on docker.io
      imagePullSecrets:
        - name: 'cr-simoncor-net-login'

      containers:
        - name: 'simoncor-net'
          image: 'cr.simoncor.net/siempie/simoncor-net'
          imagePullPolicy: 'Always'

          resources:
            limits:
              cpu: '500m'
              memory: '16Mi'
            requests:
              cpu: '250m'
              memory: '8Mi'

          readinessProbe:
            initialDelaySeconds: 5
            periodSeconds: 5
            httpGet:
              path: '/favicon.ico'
              port: 80
              httpHeaders:
                - name: 'Host'
                  value: 'simoncor.net'

          livenessProbe:
            initialDelaySeconds: 10
            periodSeconds: 5
            httpGet:
              path: '/favicon.ico'
              port: 80
              httpHeaders:
                - name: 'Host'
                  value: 'simoncor.net'

          ports:
            - containerPort: 80


# service
---
apiVersion: 'v1'
kind: 'Service'
metadata:
  name: 'simoncor-net-svc'
  namespace: 'simoncor-net'

spec:
  type: 'ClusterIP'
  selector:
    app: 'simoncor-net'

  ports:
    - protocol: 'TCP'
      port: 80
      targetPort: 80


# network policy
---
apiVersion: 'networking.k8s.io/v1'
kind: 'NetworkPolicy'
metadata:
  name: 'simoncor-net-np'
  namespace: 'simoncor-net'

spec:
  podSelector:
    matchLabels:
      app: 'simoncor-net'

  policyTypes:
    - 'Ingress'

  ingress:
    - ports:
        - protocol: 'TCP'
          port: 80

manifests/40_ing.yaml

0 → 100644
+21 −0
Original line number Diff line number Diff line
# ingress
---
apiVersion: 'networking.k8s.io/v1'
kind: 'Ingress'
metadata:
  name: 'simoncor-net-ing'
  namespace: 'simoncor-net'

spec:
  ingressClassName: 'nginx'
  rules:
    - host: 'simoncor.net'
      http:
        paths:
          - path: '/'
            pathType: 'Prefix'
            backend:
              service:
                name: 'simoncor-net-svc'
                port:
                  number: 80

renovate.json

0 → 100644
+9 −0
Original line number Diff line number Diff line
{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "dependencyDashboard": true,
  "extends": [ "local>siempie/renovate" ],
  "enabledManagers": ["kubernetes"],
  "kubernetes": {
    "fileMatch": [ "^manifests/.*\\.yaml$" ]
  }
}