-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
salt, ui: deploy UI using *Ingress*es
The Kubernetes API, SaltAPI, Prometheus and the actual UI are now exposed using the `nginx-control-plane` *Ingress* controller, and as such accessible through the control-plane network IP of the 'bootstrap' node, port 8443. Note: this also updates Cypress to a (for now) unreleased version, because the current released version doesn't support self-signed TLS certificates when using an IP-based host as a test target (which is the case in our setup). This was reported upstream in cypress-io/cypress#771 and fixed in cypress-io/cypress#4947. The information as to how to install an unreleased version of Cypress I got from cypress-io/cypress#4525. We also ensure all shared libraries this version of Cypress uses are installed in the test environment. Fixes: #1602 See: #1602 Fixes: #1797 See: #1797 Fixes: #1799 See: #1799 Fixes: #1800 See: #1800 See: cypress-io/cypress#4947 See: cypress-io/cypress#771 See: cypress-io/cypress#4525
- Loading branch information
Showing
18 changed files
with
186 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!kubernetes kubeconfig=/etc/kubernetes/admin.conf&context=kubernetes-admin@kubernetes | ||
|
||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: kubernetes-api | ||
namespace: metalk8s-ui | ||
labels: | ||
app: metalk8s-ui | ||
app.kubernetes.io/managed-by: salt | ||
app.kubernetes.io/name: metalk8s-ui | ||
app.kubernetes.io/part-of: metalk8s | ||
heritage: metalk8s | ||
spec: | ||
type: ExternalName | ||
externalName: kubernetes.default.svc.cluster.local | ||
ports: | ||
- name: https | ||
port: 443 | ||
--- | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: salt-api | ||
namespace: metalk8s-ui | ||
labels: | ||
app: metalk8s-ui | ||
app.kubernetes.io/managed-by: salt | ||
app.kubernetes.io/name: metalk8s-ui | ||
app.kubernetes.io/part-of: metalk8s | ||
heritage: metalk8s | ||
spec: | ||
type: ExternalName | ||
externalName: salt-master.kube-system.svc.cluster.local | ||
ports: | ||
- name: https | ||
port: 4507 | ||
--- | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: prometheus-api | ||
namespace: metalk8s-ui | ||
labels: | ||
app: metalk8s-ui | ||
app.kubernetes.io/managed-by: salt | ||
app.kubernetes.io/name: metalk8s-ui | ||
app.kubernetes.io/part-of: metalk8s | ||
heritage: metalk8s | ||
spec: | ||
type: ExternalName | ||
externalName: prometheus-operator-prometheus.metalk8s-monitoring.svc.cluster.local | ||
ports: | ||
- name: http | ||
port: 9090 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!kubernetes kubeconfig=/etc/kubernetes/admin.conf&context=kubernetes-admin@kubernetes | ||
|
||
apiVersion: networking.k8s.io/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: metalk8s-ui-proxies-https | ||
namespace: metalk8s-ui | ||
labels: | ||
app: metalk8s-ui | ||
app.kubernetes.io/managed-by: salt | ||
app.kubernetes.io/name: metalk8s-ui | ||
app.kubernetes.io/part-of: metalk8s | ||
heritage: metalk8s | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: '/$2' | ||
nginx.ingress.kubernetes.io/use-regex: "true" | ||
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" | ||
kubernetes.io/ingress.class: "nginx-control-plane" | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: /api/kubernetes(/|$)(.*) | ||
backend: | ||
serviceName: kubernetes-api | ||
servicePort: 443 | ||
- path: /api/salt(/|$)(.*) | ||
backend: | ||
serviceName: salt-api | ||
servicePort: 4507 | ||
--- | ||
apiVersion: networking.k8s.io/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: metalk8s-ui-proxies-http | ||
namespace: metalk8s-ui | ||
labels: | ||
app: metalk8s-ui | ||
app.kubernetes.io/managed-by: salt | ||
app.kubernetes.io/name: metalk8s-ui | ||
app.kubernetes.io/part-of: metalk8s | ||
heritage: metalk8s | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: '/$2' | ||
nginx.ingress.kubernetes.io/use-regex: "true" | ||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP" | ||
kubernetes.io/ingress.class: "nginx-control-plane" | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: /api/prometheus(/|$)(.*) | ||
backend: | ||
serviceName: prometheus-api | ||
servicePort: 9090 | ||
--- | ||
apiVersion: networking.k8s.io/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: metalk8s-ui | ||
namespace: metalk8s-ui | ||
labels: | ||
app: metalk8s-ui | ||
app.kubernetes.io/managed-by: salt | ||
app.kubernetes.io/name: metalk8s-ui | ||
app.kubernetes.io/part-of: metalk8s | ||
heritage: metalk8s | ||
annotations: | ||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP" | ||
kubernetes.io/ingress.class: "nginx-control-plane" | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: / | ||
backend: | ||
serviceName: metalk8s-ui | ||
servicePort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include: | ||
- .namespace | ||
- .dependencies | ||
- .ui | ||
- .ingress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!kubernetes kubeconfig=/etc/kubernetes/admin.conf&context=kubernetes-admin@kubernetes | ||
|
||
kind: Namespace | ||
apiVersion: v1 | ||
metadata: | ||
name: metalk8s-ui | ||
labels: | ||
app.kubernetes.io/managed-by: salt | ||
app.kubernetes.io/part-of: metalk8s | ||
heritage: metalk8s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.