Changeset - d3caeaf39d87
[Not reviewed]
default
0 0 6
drewp@bigasterisk.com - 2 years ago 2022-12-13 07:16:59
drewp@bigasterisk.com
deploy with invoke & skaffold
6 files changed with 69 insertions and 0 deletions:
0 comments (0 inline, 0 general)
00-defs/skaffold.yaml
Show inline comments
 
new file 100644
 
apiVersion: skaffold/v3
 
kind: Config
 
metadata:
 
  name: pomerium
 
manifests:
 
  rawYaml:
 
    - 00-namespace.yaml
 
    - 01-crd.yaml
 
    - 02-roles.yaml
 
    - 49-cert-manager-crd.yaml
 
    - 49-cert-manager-roles.yaml
10-vols/skaffold.yaml
Show inline comments
 
new file 100644
 
apiVersion: skaffold/v3
 
kind: Config
 
metadata:
 
  name: pomerium
 
manifests:
 
  rawYaml:
 
    - volumes.yaml
 
    - claims.yaml
20-kube/skaffold.yaml
Show inline comments
 
new file 100644
 
apiVersion: skaffold/v3
 
kind: Config
 
metadata:
 
  name: pomerium
 
manifests:
 
  rawYaml:
 
    - 05-idp-secret.yaml
 
    - 10-pom-pom.yaml
 
    - 20-pom-deploy.yaml
 
    - 21-pom-svc.yaml
30-cert-manager/skaffold.yaml
Show inline comments
 
new file 100644
 
apiVersion: skaffold/v3
 
kind: Config
 
metadata:
 
  name: pomerium
 
manifests:
 
  rawYaml:
 
    - 50-cert-manager.yaml
 
    - 51-pomerium-production-issuer.yaml
 
    - 51-pomerium-staging-issuer.yaml
 
    - 60-auth-cert.yaml
skaffold.yaml
Show inline comments
 
new file 100644
 
apiVersion: skaffold/v3
 
kind: Config
 
metadata:
 
  name: pomerium
 
manifests:
 
  rawYaml:
 
  - ingress-default.yaml
 
  - ingress-static.yaml
tasks.py
Show inline comments
 
new file 100644
 
from invoke import task
 
from invoke.exceptions import UnexpectedExit
 
@task
 
def delete(ctx):
 
    ctx.run("cd 30-cert-manager; skaffold delete")
 
    ctx.run("cd 20-kube; skaffold delete")
 
    ctx.run("cd 10-vols; skaffold delete")
 
    ctx.run("cd 00-defs; skaffold delete")
 

	
 
@task
 
def run(ctx):
 
    ctx.run("cd 00-defs; skaffold run", echo=True)
 
    ctx.run("cd 10-vols; skaffold run", echo=True)
 
    ctx.run("cd 20-kube; skaffold run", echo=True)
 
    # here we must wait for cert-manager-webhook.cert-manager.svc
 
    ctx.run("cd 30-cert-manager; skaffold run", echo=True, warn=True)
 
    ctx.run("cd 30-cert-manager; skaffold run", echo=True)
 

	
 
    try:
 
        ctx.run("kubectl get -n pomerium ingress | grep 80")
 
    except UnexpectedExit:
 
        raise SystemExit("expected cm-acme-http-solver-... ingress on port 80")
0 comments (0 inline, 0 general)