mirror of
https://github.com/nikdoof/ohayodash.git
synced 2025-12-17 11:59:25 +00:00
Compare commits
2 Commits
0.0.1
...
ohayodash-
| Author | SHA1 | Date | |
|---|---|---|---|
|
4bee0d3fd8
|
|||
|
1592d49ed7
|
@@ -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
|
||||
|
||||
@@ -9,7 +9,7 @@ image:
|
||||
# -- image repository
|
||||
repository: ghcr.io/nikdoof/ohayodash
|
||||
# -- image pull policy
|
||||
pullPolicy: IfNotPresent
|
||||
pullPolicy: Always
|
||||
# -- image tag
|
||||
tag: latest
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user