summaryrefslogtreecommitdiff
path: root/blog/k8s.yaml
blob: 01cff113bbf58cdfd31186ff5a8fab8addf76cc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: Namespace
  metadata:
    name: blog
- apiVersion: apps/v1
  kind: Deployment
  metadata:
    labels:
      app: blog
    name: blog
    namespace: blog
  spec:
    selector:
      matchLabels:
        app: blog
    template:
      metadata:
        labels:
          app: blog
      spec:
        containers:
        - command:
          - /cnb/lifecycle/launcher
          - python
          - -m
          - blog
          - --key-cert
          - /tls-gemini/tls.key
          - /tls-gemini/tls.crt
          - https
          - alex.corcoles.net
          env:
            - name: OTEL_EXPORTER_OTLP_ENDPOINT
              value: http://clickhouse.h1.int.pdp7.net:4317
            - name: OTEL_EXPORTER_OTLP_INSECURE
              value: "true"
          image: quay.io/alexpdp7/blog:latest
          imagePullPolicy: Always
          name: blog
          volumeMounts:
            - mountPath: /tls-gemini
              name: tls-gemini
        volumes:
          - name: tls-gemini
            secret:
              secretName: tls-gemini
- apiVersion: v1
  kind: Service
  metadata:
    labels:
      app: blog
    name: http
    namespace: blog
  spec:
    ports:
    - port: 8000
      protocol: TCP
      targetPort: 8000
    selector:
      app: blog
- apiVersion: v1
  kind: Service
  metadata:
    labels:
      app: blog
    name: gemini
    namespace: blog
  spec:
    ports:
    - nodePort: 31965
      port: 1965
      protocol: TCP
      targetPort: 1965
    selector:
      app: blog
    type: NodePort
- apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: http
    namespace: blog
  spec:
    rules:
    - host: alex.corcoles.net
      http:
        paths:
        - backend:
            service:
              name: http
              port:
                number: 8000
          path: /
          pathType: Prefix