From ad1c5af0d89b79ee4dbd20aed5b8457260f31d0a Mon Sep 17 00:00:00 2001 From: Eric Dobbs Date: Sun, 10 Jan 2021 16:02:45 -0700 Subject: [PATCH] change domain names in kubernetes example to use localhost Now that both chrome and firefox understand *.localhost domains we can remove our suggestion of using localtest.me subdomains. Also update the brew install instructions now that brew cask install is deprecated in favor of brew install --cask My favorite improvement is finding a way to use yaml block labels and references to reduce the duplication in the ingress config. I suppose the last important thing to mention about this changes is that k3d seems to have switched from traefik to nginx for its ingress loadbalancer. We no longer need the traefik annotation. --- examples/k8s/README.md | 13 ++++++++----- examples/k8s/wiki.yaml | 17 +++++------------ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/examples/k8s/README.md b/examples/k8s/README.md index 37d3ca1..0db19fe 100644 --- a/examples/k8s/README.md +++ b/examples/k8s/README.md @@ -5,7 +5,7 @@ using wiki to drive some learning about kubernetes. # We're using MacOS, Docker Desktop, and k3d - brew cask install docker + brew install --cask docker brew install k3d mkdir -p ~/.wiki-k8s ~/workspace/fedwiki @@ -26,13 +26,16 @@ using wiki to drive some learning about kubernetes. "secure_cookie": false, "security_type": "friends", "wikiDomains": { - "simple.localtest.me": { - "id": "/home/node/.wiki/config.owner.json" + "localhost": { + "id": "/home/node/.wiki/localhost.owner.json" + }, + "example.com": { + "id": "/home/node/.wiki/example.com.owner.json" } } } -# example ~/.wiki-k8s/config.owner.json +# example ~/.wiki-k8s/localhost.owner.json `.friend.secret` must match the `.admin` field from `config.json` @@ -50,4 +53,4 @@ using wiki to drive some learning about kubernetes. # Play with the wiki - open http://simple.localtest.me + open http://wiki.localhost diff --git a/examples/k8s/wiki.yaml b/examples/k8s/wiki.yaml index 70b2f08..78925ec 100644 --- a/examples/k8s/wiki.yaml +++ b/examples/k8s/wiki.yaml @@ -50,22 +50,15 @@ spec: apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: simple-wiki - annotations: - kubernetes.io/ingress.class: traefik + name: wiki spec: rules: - - host: simple.localtest.me - http: - paths: - - path: / - backend: - serviceName: wiki-service - servicePort: http - - host: "*.simple.localtest.me" - http: + - host: "*.localhost" + http: &wiki paths: - path: / backend: serviceName: wiki-service servicePort: http + # - host: "*.example.com" + # http: *wiki