| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f7613cf commit 6aa5afa
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,177 @@ | |||
| 1 | + # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| 2 | + # contributor license agreements. See the NOTICE file distributed with | ||
| 3 | + # this work for additional information regarding copyright ownership. | ||
| 4 | + # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| 5 | + # (the "License"); you may not use this file except in compliance with | ||
| 6 | + # the License. You may obtain a copy of the License at | ||
| 7 | + # | ||
| 8 | + # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + # | ||
| 10 | + # Unless required by applicable law or agreed to in writing, software | ||
| 11 | + # distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + # See the License for the specific language governing permissions and | ||
| 14 | + # limitations under the License. | ||
| 15 | + --- | ||
| 16 | + apiVersion: networking.k8s.io/v1 | ||
| 17 | + kind: Ingress | ||
| 18 | + metadata: | ||
| 19 | + annotations: | ||
| 20 | + nginx.ingress.kubernetes.io/proxy-body-size: 48m | ||
| 21 | + nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" | ||
| 22 | + nginx.ingress.kubernetes.io/proxy-read-timeout: "300" | ||
| 23 | + nginx.ingress.kubernetes.io/proxy-send-timeout: "300" | ||
| 24 | + | ||
| 25 | + $T cert-manager.io/cluster-issuer: letsencrypt-prod | ||
| 26 | + $T nginx.ingress.kubernetes.io/force-ssl-redirect: "true" | ||
| 27 | + | ||
| 28 | + name: ${USERNAME}-my-streamer-ingress | ||
| 29 | + namespace: nuvolaris | ||
| 30 | + | ||
| 31 | + spec: | ||
| 32 | + ingressClassName: nginx | ||
| 33 | + | ||
| 34 | + $T tls: | ||
| 35 | + $T - hosts: | ||
| 36 | + $T - ${USERNAME}.${BASE_HOST:-localhost} | ||
| 37 | + $T secretName: streamer-api-tls | ||
| 38 | + | ||
| 39 | + rules: | ||
| 40 | + - host: ${USERNAME}.${BASE_HOST:-localhost} | ||
| 41 | + http: | ||
| 42 | + paths: | ||
| 43 | + - backend: | ||
| 44 | + service: | ||
| 45 | + name: nuvolaris-streamer-api | ||
| 46 | + port: | ||
| 47 | + number: 8080 | ||
| 48 | + path: / | ||
| 49 | + pathType: Prefix | ||
| 50 | + | ||
| 51 | + --- | ||
| 52 | + # /stream/web/... -> /web/${USERNAME}/... | ||
| 53 | + apiVersion: networking.k8s.io/v1 | ||
| 54 | + kind: Ingress | ||
| 55 | + metadata: | ||
| 56 | + annotations: | ||
| 57 | + nginx.ingress.kubernetes.io/proxy-body-size: 48m | ||
| 58 | + nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" | ||
| 59 | + nginx.ingress.kubernetes.io/proxy-read-timeout: "300" | ||
| 60 | + nginx.ingress.kubernetes.io/proxy-send-timeout: "300" | ||
| 61 | + nginx.ingress.kubernetes.io/use-regex: "true" | ||
| 62 | + nginx.ingress.kubernetes.io/rewrite-target: /web/${USERNAME}/$$2 | ||
| 63 | + | ||
| 64 | + $T cert-manager.io/cluster-issuer: letsencrypt-prod | ||
| 65 | + $T nginx.ingress.kubernetes.io/force-ssl-redirect: "true" | ||
| 66 | + | ||
| 67 | + name: ${USERNAME}-my-streamer-web-ingress | ||
| 68 | + namespace: nuvolaris | ||
| 69 | + | ||
| 70 | + spec: | ||
| 71 | + ingressClassName: nginx | ||
| 72 | + | ||
| 73 | + $T tls: | ||
| 74 | + $T - hosts: | ||
| 75 | + $T - ${USERNAME}.${BASE_HOST:-localhost} | ||
| 76 | + $T secretName: streamer-api-tls | ||
| 77 | + | ||
| 78 | + rules: | ||
| 79 | + - host: ${USERNAME}.${BASE_HOST:-localhost} | ||
| 80 | + http: | ||
| 81 | + paths: | ||
| 82 | + - backend: | ||
| 83 | + service: | ||
| 84 | + name: nuvolaris-streamer-api | ||
| 85 | + port: | ||
| 86 | + number: 8080 | ||
| 87 | + path: /stream/web(/|$$)(.*) | ||
| 88 | + pathType: ImplementationSpecific | ||
| 89 | + | ||
| 90 | + --- | ||
| 91 | + # /stream/action/... -> /action/${USERNAME}/... | ||
| 92 | + apiVersion: networking.k8s.io/v1 | ||
| 93 | + kind: Ingress | ||
| 94 | + metadata: | ||
| 95 | + annotations: | ||
| 96 | + nginx.ingress.kubernetes.io/proxy-body-size: 48m | ||
| 97 | + nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" | ||
| 98 | + nginx.ingress.kubernetes.io/proxy-read-timeout: "300" | ||
| 99 | + nginx.ingress.kubernetes.io/proxy-send-timeout: "300" | ||
| 100 | + nginx.ingress.kubernetes.io/use-regex: "true" | ||
| 101 | + nginx.ingress.kubernetes.io/rewrite-target: /action/${USERNAME}/$$2 | ||
| 102 | + | ||
| 103 | + $T cert-manager.io/cluster-issuer: letsencrypt-prod | ||
| 104 | + $T nginx.ingress.kubernetes.io/force-ssl-redirect: "true" | ||
| 105 | + | ||
| 106 | + name: ${USERNAME}-my-streamer-action-ingress | ||
| 107 | + namespace: nuvolaris | ||
| 108 | + | ||
| 109 | + spec: | ||
| 110 | + ingressClassName: nginx | ||
| 111 | + | ||
| 112 | + $T tls: | ||
| 113 | + $T - hosts: | ||
| 114 | + $T - ${USERNAME}.${BASE_HOST:-localhost} | ||
| 115 | + $T secretName: streamer-api-tls | ||
| 116 | + | ||
| 117 | + rules: | ||
| 118 | + - host: ${USERNAME}.${BASE_HOST:-localhost} | ||
| 119 | + http: | ||
| 120 | + paths: | ||
| 121 | + - backend: | ||
| 122 | + service: | ||
| 123 | + name: nuvolaris-streamer-api | ||
| 124 | + port: | ||
| 125 | + number: 8080 | ||
| 126 | + path: /stream/action(/|$$)(.*) | ||
| 127 | + pathType: ImplementationSpecific | ||
| 128 | + | ||
| 129 | + --- | ||
| 130 | + # S3 buckets on the app host, so clients do not need s3.${BASE_HOST:-localhost}. | ||
| 131 | + # | ||
| 132 | + # NO rewrite-target here, deliberately: SigV4 signs the canonical request path, | ||
| 133 | + # so any rewrite makes SeaweedFS recompute a different signature and the request | ||
| 134 | + # fails with SignatureDoesNotMatch. The bucket name therefore has to stay in the | ||
| 135 | + # path exactly as the client signed it. | ||
| 136 | + apiVersion: networking.k8s.io/v1 | ||
| 137 | + kind: Ingress | ||
| 138 | + metadata: | ||
| 139 | + annotations: | ||
| 140 | + nginx.ingress.kubernetes.io/proxy-body-size: 1024m | ||
| 141 | + nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" | ||
| 142 | + nginx.ingress.kubernetes.io/proxy-read-timeout: "300" | ||
| 143 | + nginx.ingress.kubernetes.io/proxy-send-timeout: "300" | ||
| 144 | + | ||
| 145 | + $T cert-manager.io/cluster-issuer: letsencrypt-prod | ||
| 146 | + $T nginx.ingress.kubernetes.io/force-ssl-redirect: "true" | ||
| 147 | + | ||
| 148 | + name: ${USERNAME}-my-s3-ingress | ||
| 149 | + namespace: nuvolaris | ||
| 150 | + | ||
| 151 | + spec: | ||
| 152 | + ingressClassName: nginx | ||
| 153 | + | ||
| 154 | + $T tls: | ||
| 155 | + $T - hosts: | ||
| 156 | + $T - ${USERNAME}.${BASE_HOST:-localhost} | ||
| 157 | + $T secretName: streamer-api-tls | ||
| 158 | + | ||
| 159 | + rules: | ||
| 160 | + - host: ${USERNAME}.${BASE_HOST:-localhost} | ||
| 161 | + http: | ||
| 162 | + paths: | ||
| 163 | + - backend: | ||
| 164 | + service: | ||
| 165 | + name: seaweedfs | ||
| 166 | + port: | ||
| 167 | + number: 9000 | ||
| 168 | + path: /${USERNAME}-web | ||
| 169 | + pathType: Prefix | ||
| 170 | + - backend: | ||
| 171 | + service: | ||
| 172 | + name: seaweedfs | ||
| 173 | + port: | ||
| 174 | + number: 9000 | ||
| 175 | + path: /${USERNAME}-data | ||
| 176 | + pathType: Prefix | ||
| 177 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,64 @@ | |||
| 1 | + # Licensed to the Apache Software Foundation (ASF) under one | ||
| 2 | + # or more contributor license agreements. See the NOTICE file | ||
| 3 | + # distributed with this work for additional information | ||
| 4 | + # regarding copyright ownership. The ASF licenses this file | ||
| 5 | + # to you under the Apache License, Version 2.0 (the | ||
| 6 | + # "License"); you may not use this file except in compliance | ||
| 7 | + # with the License. You may obtain a copy of the License at | ||
| 8 | + # | ||
| 9 | + # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | + # | ||
| 11 | + # Unless required by applicable law or agreed to in writing, | ||
| 12 | + # software distributed under the License is distributed on an | ||
| 13 | + # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| 14 | + # KIND, either express or implied. See the License for the | ||
| 15 | + # specific language governing permissions and limitations | ||
| 16 | + # under the License. | ||
| 17 | + | ||
| 18 | + version: "3" | ||
| 19 | + | ||
| 20 | + env: | ||
| 21 | + KUBECONFIG: | ||
| 22 | + sh: | | ||
| 23 | + if test -e "$OPS_TMP/kubeconfig" | ||
| 24 | + then echo "$OPS_TMP/kubeconfig" | ||
| 25 | + else echo ~/.kube/config | ||
| 26 | + fi | ||
| 27 | + | ||
| 28 | + INGRESS_TYPE: | ||
| 29 | + sh: ops util ingress-type | ||
| 30 | + | ||
| 31 | + T: | ||
| 32 | + sh: | | ||
| 33 | + if ops util kubeget wsk/controller .status.whisk_create.tls | rg on >/dev/null | ||
| 34 | + then echo "" | ||
| 35 | + else echo "#" | ||
| 36 | + fi | ||
| 37 | + | ||
| 38 | + BASE_HOST: | ||
| 39 | + sh: | | ||
| 40 | + ops util kubeget ingress/apihost .spec.rules[0].host | ||
| 41 | + | ||
| 42 | + ACTION: "apply" | ||
| 43 | + | ||
| 44 | + tasks: | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + deploy: | ||
| 48 | + requires: { vars: [U]} | ||
| 49 | + desc: deploy | ||
| 50 | + silent: true | ||
| 51 | + cmds: | ||
| 52 | + - | | ||
| 53 | + export USERNAME="{{.U}}" | ||
| 54 | + envsubst -i {{.INGRESS_TYPE}}-template.yaml >_ingress.yaml | ||
| 55 | + kubectl -n nuvolaris {{.ACTION}} -f _ingress.yaml | ||
| 56 | + | ||
| 57 | + undeploy: | ||
| 58 | + requires: { vars: [U]} | ||
| 59 | + desc: undeploy | ||
| 60 | + silent: true | ||
| 61 | + cmds: | ||
| 62 | + - task: deploy | ||
| 63 | + vars: | ||
| 64 | + ACTION: "delete" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments