Skip to content

Commit

Permalink
konvoy-ui: charts landing for ops portal and Traefik config
Browse files Browse the repository at this point in the history
konvoy-ui: charts landing for ops portal and Traefik config
Hector Fernandez authored Jul 19, 2019

Verified

This commit was signed with the committer’s verified signature.
MaferMazu María Fernanda Magallanes
2 parents c64412c + 8f4489b commit 173fa1d
Showing 7 changed files with 126 additions and 5 deletions.
4 changes: 2 additions & 2 deletions stable/kommander/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: kommander
home: https://github.com/mesosphere/kommander
appVersion: "1.46.1"
appVersion: "1.47.2"
description: Kommander
version: 0.1.9
version: 0.1.10
maintainers:
- name: hectorj2f
5 changes: 4 additions & 1 deletion stable/kommander/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -11,8 +11,11 @@ metadata:
annotations:
kubernetes.io/ingress.class: traefik
{{- if (eq "konvoy" .Values.mode) }}
traefik.ingress.kubernetes.io/rewrite-target: /
traefik.ingress.kubernetes.io/priority: "1"
traefik.ingress.kubernetes.io/redirect-permanent: "true"
traefik.ingress.kubernetes.io/redirect-regex: ^https://([^/]*)/ops/portal$
traefik.ingress.kubernetes.io/redirect-replacement: https://$1/ops/portal/
traefik.ingress.kubernetes.io/request-modifier: 'ReplacePathRegex: ^/ops/portal/(.*) /$1'
{{- else }}
traefik.frontend.rule.type: {{ .Values.ingress.traefikFrontendRuleType }}
{{- with .Values.ingress.extraAnnotations }}
2 changes: 1 addition & 1 deletion stable/kommander/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: mesosphere/kommander
tag: 1.46.1
tag: 1.47.2
pullPolicy: IfNotPresent
replicas: 1
logoutRedirectPath: /
5 changes: 4 additions & 1 deletion stable/opsportal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
apiVersion: v1
appVersion: "1.0.0"
home: https://github.com/mesosphere/charts
description: OpsPortal Chart
name: opsportal
version: 0.0.2
version: 0.0.3
maintainers:
- name: hectorj2f
1 change: 1 addition & 0 deletions stable/opsportal/templates/ingress-opsportal.yaml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ metadata:
annotations:
kubernetes.io/ingress.class: traefik
traefik.frontend.rule.type: PathPrefixStrip
traefik.ingress.kubernetes.io/priority: "2"
name: {{ template "opsportal.fullname" . }}-addons
namespace: {{ .Release.Namespace }}
spec:
111 changes: 111 additions & 0 deletions stable/opsportal/templates/landing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{{- if .Values.landing.enabled }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: opsportal-landing
name: opsportal-landing
namespace: {{ .Release.Namespace }}
spec:
ports:
- name: opsportal-landing
port: 80
protocol: TCP
targetPort: 80
selector:
app: opsportal-landing
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/rule-type: Path
name: opsportal-landing
namespace: {{ .Release.Namespace }}
spec:
rules:
- http:
paths:
- backend:
serviceName: opsportal-landing
servicePort: 80
path: /landing
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: opsportal-landing
name: opsportal-landing
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: opsportal-landing
template:
metadata:
labels:
app: opsportal-landing
spec:
containers:
- name: opsportal-landing
image: nginx:1.15-alpine
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- name: landing-html
mountPath: /usr/share/nginx/html
- name: landing-conf
mountPath: /etc/nginx
volumes:
- name: landing-html
configMap:
name: opsportal-landing-html
- name: landing-conf
configMap:
name: opsportal-landing-conf
---
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: opsportal-landing-html
namespace: {{ .Release.Namespace }}
labels:
app: opsportal-landing
data:
index.html: |
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Konvoy Landing</title> <style> * { box-sizing: border-box; } html, body { color: #1B2029; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', 'Arial', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; font-weight: 400; height: 100%; margin: 0; padding: 0; } #app { height: 100%; background-color: #F7F8F9; display: flex; align-items: center; justify-content: center; } .landing-container { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 350px; } .card { width: 100%; text-align: center; background-color: white; padding: 32px; border: 1px solid #DADDE2; border-radius: 4px; margin: 24px 0; } .heading { font-weight: 500; font-size: 18px; margin: 0; padding-bottom: 12px; } .button { display: block; background-color: #E1E3E7; border-radius: 4px; padding: 8px; margin-top: 16px; color: inherit; text-decoration: none; cursor: pointer; font-weight: 500; } .button:hover { background-color: #cacccf; } .logo { width: 48px; height: 48px; } .brand-link { color: #4B3499; text-decoration: none; font-size: 12px; } .brand-link:hover { color: #432e89; } .privacy { font-size: 12px; margin-top: 12px; color: #76797E; text-align: center; } .link { color: inherit; } .link:hover { color: #6a6c71; } </style></head><body> <div id="app"> <div class="landing-container"> <div class="logo"> <svg xmlns="http://www.w3.org/2000/svg"> <g fill="none" fill-rule="evenodd"> <path fill="#330072" d="M0 68h68V0H0z"/> <g fill="#FEFEFE"> <path d="M47.464 50.621c0 1.994-1.65 3.61-3.684 3.61-2.035 0-3.684-1.616-3.684-3.61v-7.22c0-1.994 1.65-3.61 3.684-3.61 2.035 0 3.684 1.616 3.684 3.61v7.22zm-3.684-14.44c-4.07 0-7.368 3.232-7.368 7.22v7.22c0 3.988 3.299 7.22 7.368 7.22 4.07 0 7.368-3.232 7.368-7.22v-7.22c0-3.988-3.299-7.22-7.368-7.22zM30.902 39.79v-3.61H16.166v3.61h5.526v14.441h-5.526v3.61h14.736v-3.61h-5.526v-14.44zM27.218 23.544c0 1.994-1.65 3.61-3.684 3.61H19.85v-14.44h3.684c2.034 0 3.684 1.616 3.684 3.61v7.22zm-3.684-14.44h-7.369v21.66h7.369c4.07 0 7.368-3.232 7.368-7.22v-7.22c0-3.988-3.299-7.22-7.368-7.22zM40.112 24.447c0-1.495 1.238-2.708 2.763-2.708h1.842c3.561 0 6.448-2.828 6.448-6.318 0-3.489-2.887-6.318-6.448-6.318h-8.289v3.61h8.29c1.525 0 2.763 1.213 2.763 2.708 0 1.496-1.238 2.708-2.764 2.708h-1.842c-3.56 0-6.447 2.829-6.447 6.318l-.016 6.318h14.736v-3.61H40.112v-2.708z"/> <path d="M53.862 56.355l-2.605 2.553-8.851-8.673 2.605-2.553z"/> </g> </g> </svg> </div> <div class="card"> <h1 class="heading">Welcome to Konvoy!</h1> <a href="/ops/portal/" class="button">Launch Console</a> <a href="/token" class="button">Generate Kubectl Token</a> </div> <a class="brand-link" href="https://mesosphere.com/">D2iQ</a> <div class="privacy"> By logging in you understand that we will process personal information in accordance with our <a href="https://mesosphere.com/privacy/" class="link">Privacy Policy</a> <div></div> </div> </div> </div></body></html>
---
apiVersion: v1
kind: ConfigMap
metadata:
name: opsportal-landing-conf
namespace: {{ .Release.Namespace }}
labels:
app: opsportal-landing
data:
nginx.conf: |
worker_processes 1;
error_log /dev/stdout info;
events {
worker_connections 1024;
}
http {
server {
access_log /dev/stdout;
listen 80;
root /usr/share/nginx/html;
location / {
try_files $uri /index.html;
}
location = /index.html {
expires 30s;
}
}
}
{{- end }}
3 changes: 3 additions & 0 deletions stable/opsportal/values.yaml
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@ bearerproxy:
tag: "latest"
pullPolicy: "Always"

landing:
enabled: true

opsportal:
ingress:
paths:

0 comments on commit 173fa1d

Please sign in to comment.