Helm-Toolkit: Add basic documentation for ingress macro
This PS adds basic documentation for the ingress macro. Change-Id: Iabfa76eae6bb79f914a3fce0047a82ab1e915c76 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
2481767744
commit
a957ff6c05
@ -14,10 +14,131 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
# This function creates a manifest for a services ingress rules.
|
{{/*
|
||||||
# It can be used in charts dict created similar to the following:
|
abstract: |
|
||||||
# {- $ingressOpts := dict "envAll" . "backendServiceType" "key-manager" -}
|
Creates a manifest for a services ingress rules.
|
||||||
# { $ingressOpts | include "helm-toolkit.manifests.ingress" }
|
values: |
|
||||||
|
network:
|
||||||
|
api:
|
||||||
|
ingress:
|
||||||
|
public: true
|
||||||
|
classes:
|
||||||
|
namespace: "nginx"
|
||||||
|
cluster: "nginx-cluster"
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
secrets:
|
||||||
|
tls:
|
||||||
|
key_manager:
|
||||||
|
api:
|
||||||
|
public: barbican-tls-public
|
||||||
|
endpoints:
|
||||||
|
cluster_domain_suffix: cluster.local
|
||||||
|
key_manager:
|
||||||
|
name: barbican
|
||||||
|
hosts:
|
||||||
|
default: barbican-api
|
||||||
|
public: barbican
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
public:
|
||||||
|
host: barbican.openstackhelm.example
|
||||||
|
tls:
|
||||||
|
crt: |
|
||||||
|
FOO-CRT
|
||||||
|
key: |
|
||||||
|
FOO-KEY
|
||||||
|
ca: |
|
||||||
|
FOO-CA_CRT
|
||||||
|
path:
|
||||||
|
default: /
|
||||||
|
scheme:
|
||||||
|
default: http
|
||||||
|
public: https
|
||||||
|
port:
|
||||||
|
api:
|
||||||
|
default: 9311
|
||||||
|
public: 80
|
||||||
|
usage: |
|
||||||
|
{{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" ) -}}
|
||||||
|
return: |
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: barbican
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: barbican
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: barbican-api
|
||||||
|
servicePort: b-api
|
||||||
|
- host: barbican.default
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: barbican-api
|
||||||
|
servicePort: b-api
|
||||||
|
- host: barbican.default.svc.cluster.local
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: barbican-api
|
||||||
|
servicePort: b-api
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: barbican-namespace-fqdn
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
|
||||||
|
spec:
|
||||||
|
tls:
|
||||||
|
- secretName: barbican-tls-public
|
||||||
|
hosts:
|
||||||
|
- barbican.openstackhelm.example
|
||||||
|
rules:
|
||||||
|
- host: barbican.openstackhelm.example
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: barbican-api
|
||||||
|
servicePort: b-api
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: barbican-cluster-fqdn
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx-cluster"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
|
||||||
|
spec:
|
||||||
|
tls:
|
||||||
|
- secretName: barbican-tls-public
|
||||||
|
hosts:
|
||||||
|
- barbican.openstackhelm.example
|
||||||
|
rules:
|
||||||
|
- host: barbican.openstackhelm.example
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: barbican-api
|
||||||
|
servicePort: b-api
|
||||||
|
*/}}
|
||||||
|
|
||||||
{{- define "helm-toolkit.manifests.ingress._host_rules" -}}
|
{{- define "helm-toolkit.manifests.ingress._host_rules" -}}
|
||||||
{{- $vHost := index . "vHost" -}}
|
{{- $vHost := index . "vHost" -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user