rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
461 stars 261 forks source link

[ Istio V2 ]: CRD View - Gateways #1105

Closed brendarearden closed 2 years ago

brendarearden commented 4 years ago

Page Title: Add Gateway

Section Title: (none / na ) Field Name ( Header/Label of the field) YAML (where is the field in the yaml) Input Type (Is it string or number, etc?) Default Value/Example Text (What should the default value (value will be passed through on creation) be or the example text (value is not passed through on creation)? Tooltip Text (Text if it can help explain the field)
Name metadata.name string Default Text: mygateway  
Namespace metadata.namespace string Default Text: myapp

For the namespace, it would be ideal if able to select from existing namespaces Namespace is required

Section Title: Selector: Field Name ( Header/Label of the field) YAML (where is the field in the yaml) Input Type (Is it string or number, etc?) Default Value/Example Text (What should the default value (value will be passed through on creation) be or the example text (value is not passed through on creation)? Tooltip Text (Text if it can help explain the field)
Key spec.selector string Default Text: app  
Value spec.selector string Default Text: mygateway

Should have the ability to add and remove key value pairs Selector is required

Example :

spec:
  selector:
    <key>:<value>
Section Title: Servers: Field Name ( Header/Label of the field) YAML (where is the field in the yaml) Input Type (Is it string or number, etc?) Default Value/Example Text (What should the default value (value will be passed through on creation) be or the example text (value is not passed through on creation)? Tooltip Text (Text if it can help explain the field)
Port Number spec.servers[x].port.number integer Default Text: 80  
Port Name spec.servers[x].port.name string Default Text: http
Port Protocol spec.servers[x].port.protocol string Default Text: HTTP
Hosts spec.servers[x].hosts string[] Default Text: [bookinfo.com]

Each server should be able to have multiple hosts There should be the ability to have multiple servers At least one server is required

Section Title: Advanced Sever Options Show / Hide option for advanced options section, should still be under the same server section Advanced Options Sub Section Title: TLS Settings Field Name ( Header/Label of the field) YAML (where is the field in the yaml) Input Type (Is it string or number, etc?) Default Value/Example Text (What should the default value (value will be passed through on creation) be or the example text (value is not passed through on creation)? Tooltip Text (Text if it can help explain the field)
Mode spec.servers[x].tls.mode string dropdown Default Text: Select a Mode  
HTTPS Redirect spec.servers[x].tls.httpsRedirect bool (yes / no options) Default Selection: No
Server Certificate spec.servers[x].tls.serverCertificate string Default Text: /etc/istio/ingressgateway-certs/tls.crt
Private Key spec.servers[x].tls.privateKey string Default Text: /etc/istio/ingressgateway-certs/tls.key
CA Certificate spec.servers[x].tls.caCertificates string Default Text: /etc/istio/ingressgateway-ca-certs/ca-chain.cert.pem
Credential Name spec.servers[x].tls.credentialName string Default Text: myssl
Subject Alternative Names spec.servers[x].tls.subjectAltNames string[] Default Text: example.com

Mode dropdown values:

PASSTHROUGH
SIMPLE 
MUTUAL
AUTO_PASSTHROUGH
ISTIO_MUTUAL

DropDown Values can also be found here

Should be able to add and remove Subject Alternative Names

Section Title: Labels: Field Name ( Header/Label of the field) YAML (where is the field in the yaml) Input Type (Is it string or number, etc?) Default Value/Example Text (What should the default value (value will be passed through on creation) be or the example text (value is not passed through on creation)? Tooltip Text (Text if it can help explain the field)
Key metadata.labels string Default Text: key1  
Value metadata.labels string Default Text: value1

Example :

metadata:
  labels:
    <key>:<value>
Section Title: Annotations: Field Name ( Header/Label of the field) YAML (where is the field in the yaml) Input Type (Is it string or number, etc?) Default Value/Example Text (What should the default value (value will be passed through on creation) be or the example text (value is not passed through on creation)? Tooltip Text (Text if it can help explain the field)
Key metadata. annotations string Default Text: key1  
Value metadata. annotations string Default Text: value1

Example :

metadata:
  annotations:
    <key>:<value>

Would be nice to be able to upload a yaml as well if someone doesn't want to use the form and maybe edit as yaml Overall Type info can also be found here

Full Example Yaml:

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-gateway
  namespace: some-config-namespace
spec:
  selector:
    app: my-gateway-controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - uk.bookinfo.com
    - eu.bookinfo.com
    tls:
      httpsRedirect: true # sends 301 redirect for http requests
  - port:
      number: 443
      name: https-443
      protocol: HTTPS
    hosts:
    - uk.bookinfo.com
    - eu.bookinfo.com
    tls:
      mode: SIMPLE # enables HTTPS on this port
      serverCertificate: /etc/certs/servercert.pem
      privateKey: /etc/certs/privatekey.pem
  - port:
      number: 9443
      name: https-9443
      protocol: HTTPS
    hosts:
    - "bookinfo-namespace/*.bookinfo.com"
    tls:
      mode: SIMPLE # enables HTTPS on this port
      credentialName: bookinfo-secret # fetches certs from Kubernetes secret
  - port:
      number: 9080
      name: http-wildcard
      protocol: HTTP
    hosts:
    - "*"
  - port:
      number: 2379 # to expose internal service via external port 2379
      name: mongo
      protocol: MONGO
    hosts:
    - "*"

Example of form from old UI: Screen Shot 2020-08-25 at 11 56 00 PM

Screen Shot 2020-08-25 at 11 59 08 PM

nwmac commented 2 years ago

We don't plan to add support for this in the near future - we will be looking at the Istio UI support in a future version.