Content-Length: 226521 | pFad | https://github.com/mayocream/pastebin-ipfs/pull/9

05 feat(deploy): kubernetes deployment by mayocream · Pull Request #9 · mayocream/pastebin-ipfs · GitHub
Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

feat(deploy): kubernetes deployment #9

Merged
merged 1 commit into from
Oct 15, 2021
Merged

Conversation

mayocream
Copy link
Owner

$ helm template .
---
# Source: pastebin-ipfs/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  labels:
    app: pastebin-ipfs
  name: pastebin-ipfs
spec:
  ports:
  - name: web
    port: 3939
    targetPort: 3939
  selector:
    app: pastebin-ipfs
---
# Source: pastebin-ipfs/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: pastebin-ipfs
  name: pastebin-ipfs
spec:
  replicas: 2
  selector:
    matchLabels:
      app: pastebin-ipfs
  template:
    metadata:
      annotations:
        prometheus.io/scrape: 'true'
        prometheus.io/port: '3939'
        prometheus.io/path: '/metrics'
      labels:
        app: pastebin-ipfs
    spec:
      containers:
      - image: mayocream/pastebin-ipfs:latest
        name: pastebin-ipfs
        ports:
          - name: web
            containerPort: 3939
        resources:
          limits:
            cpu: 1
            memory: 2G
          requests:
            cpu: 50m
            memory: 50Mi
        command:
        - pstbin
        - -ipfs
        - 127.0.0.1:5001
      - image: ipfs/go-ipfs:v0.10.0
        name: ipfs-daemon
        resources:
          limits:
            cpu: 1
            memory: 2G
          requests:
            cpu: 50m
            memory: 50Mi
---
# Source: pastebin-ipfs/templates/ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: "true"
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  labels:
    app: pastebin-ipfs
  name: pastebin-ipfs
spec:
  rules:
  - host: paste.yourcomany.com
    http:
      paths:
      - path: / 
        backend:
          serviceName: pastebin-ipfs
          servicePort: 3939
  tls:
  - hosts:
    - paste.yourcomany.com
    secretName: pastebin-ipfs-host
$ helm template . | k apply --dry-run=client -f - 
service/pastebin-ipfs created (dry run)
deployment.apps/pastebin-ipfs created (dry run)
ingress.extensions/pastebin-ipfs created (dry run)

@mayocream mayocream merged commit 094f46b into main Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/mayocream/pastebin-ipfs/pull/9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy