Compare commits

...

2 Commits

3 changed files with 15 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.0.1
description: Ohayo Dash is a Kubernetes driven start page and dashboard. All configuration is done by standard Kubernetes objects and ConfigMaps.
name: ohayodash
version: 0.0.1
version: 0.0.2
kubeVersion: ">=1.16.0-0"
keywords:
- ohayodash

View File

@@ -9,7 +9,7 @@ image:
# -- image repository
repository: ghcr.io/nikdoof/ohayodash
# -- image pull policy
pullPolicy: IfNotPresent
pullPolicy: Always
# -- image tag
tag: latest

View File

@@ -1,15 +1,21 @@
from flask import Blueprint, render_template, abort
from jinja2 import TemplateNotFound
import datetime
import os
import kubernetes
import yaml
from flask import Blueprint, abort, render_template
from jinja2 import TemplateNotFound
ANNOTATION_BASE = 'ohayodash.github.io'
base = Blueprint('base', __name__, template_folder='templates')
def get_k8s_applications():
kubernetes.config.load_kube_config()
if 'KUBERNETES_SERVICE_HOST' in os.environ:
kubernetes.config.load_incluster_config()
else:
kubernetes.config.load_kube_config()
v1 = kubernetes.client.NetworkingV1Api()
ret = v1.list_ingress_for_all_namespaces(watch=False)
@@ -38,7 +44,10 @@ def get_k8s_applications():
def get_bookmarks():
kubernetes.config.load_kube_config()
if 'KUBERNETES_SERVICE_HOST' in os.environ:
kubernetes.config.load_incluster_config()
else:
kubernetes.config.load_kube_config()
v1 = kubernetes.client.CoreV1Api()
ret = v1.list_config_map_for_all_namespaces(watch=False)