mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-04-08 03:56:52 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
948de81ed3 | ||
|
|
78658c0311 | ||
|
|
7b6f11780a |
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -1,5 +1,5 @@
|
||||
on: [push, pull_request]
|
||||
name: kustomize
|
||||
name: test
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
2
Makefile
2
Makefile
@@ -12,7 +12,7 @@ VERSION:=$(shell grep 'VERSION' pkg/version/version.go | awk '{ print $$4 }' | t
|
||||
run:
|
||||
GO111MODULE=on go run -ldflags "-s -w -X github.com/stefanprodan/podinfo/pkg/version.REVISION=$(GIT_COMMIT)" cmd/podinfo/* \
|
||||
--level=debug --grpc-port=9999 --backend-url=https://httpbin.org/status/401 --backend-url=https://httpbin.org/status/500 \
|
||||
--ui-logo=https://media.giphy.com/media/l0ExbNdlJFGRphMR2/giphy.gif
|
||||
--ui-logo=https://raw.githubusercontent.com/stefanprodan/podinfo/gh-pages/cuddle_clap.gif --ui-color=#34577c
|
||||
|
||||
test:
|
||||
GO111MODULE=on go test -v -race ./...
|
||||
|
||||
@@ -53,7 +53,7 @@ gRPC API:
|
||||
|
||||
Web UI:
|
||||
|
||||

|
||||

|
||||
|
||||
To access the Swagger UI open `<podinfo-host>/swagger/index.html` in a browser.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
version: 3.1.4
|
||||
appVersion: 3.1.4
|
||||
version: 3.1.5
|
||||
appVersion: 3.1.5
|
||||
name: podinfo
|
||||
engine: gotpl
|
||||
description: Podinfo Helm chart for Kubernetes
|
||||
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
name: {{ template "podinfo.fullname" . }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ template "podinfo.fullname" . }}
|
||||
minReplicas: {{ .Values.replicaCount }}
|
||||
|
||||
@@ -6,7 +6,7 @@ backend: #http://backend-podinfo:9898/echo
|
||||
backends: []
|
||||
|
||||
ui:
|
||||
color: "cyan"
|
||||
color: "#34577c"
|
||||
message: ""
|
||||
logo: ""
|
||||
|
||||
@@ -19,7 +19,7 @@ h2c:
|
||||
|
||||
image:
|
||||
repository: stefanprodan/podinfo
|
||||
tag: 3.1.4
|
||||
tag: 3.1.5
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
service:
|
||||
|
||||
@@ -66,7 +66,7 @@ func main() {
|
||||
viper.RegisterAlias("backendUrl", "backend-url")
|
||||
hostname, _ := os.Hostname()
|
||||
viper.SetDefault("jwt-secret", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9")
|
||||
viper.SetDefault("ui-logo", "https://d33wubrfki0l68.cloudfront.net/33a12d8be0bc50be4738443101616e968c7afb8f/cba76/images/scalable.png")
|
||||
viper.SetDefault("ui-logo", "https://raw.githubusercontent.com/stefanprodan/podinfo/gh-pages/cuddle_clap.gif")
|
||||
viper.Set("hostname", hostname)
|
||||
viper.Set("version", version.VERSION)
|
||||
viper.Set("revision", version.REVISION)
|
||||
|
||||
@@ -25,7 +25,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: podinfod
|
||||
image: stefanprodan/podinfo:3.1.4
|
||||
image: stefanprodan/podinfo:3.1.5
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
@@ -48,7 +48,7 @@ spec:
|
||||
- --random-error=false
|
||||
env:
|
||||
- name: PODINFO_UI_COLOR
|
||||
value: cyan
|
||||
value: "#34577c"
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package version
|
||||
|
||||
var VERSION = "3.1.4"
|
||||
var VERSION = "3.1.5"
|
||||
var REVISION = "unknown"
|
||||
|
||||
20
ui/vue.html
20
ui/vue.html
@@ -10,8 +10,11 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
display: none;
|
||||
}
|
||||
.v-application .v-parallax {
|
||||
height: 100vh !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -19,14 +22,14 @@
|
||||
<v-app dark>
|
||||
<v-content>
|
||||
<section>
|
||||
<v-parallax id="parallax-hero" src="https://upload.wikimedia.org/wikipedia/commons/c/ca/1x1.png" :class="info.color">
|
||||
<v-parallax id="parallax-hero" :style="cuddleStyle" src="https://upload.wikimedia.org/wikipedia/commons/c/ca/1x1.png">
|
||||
<v-layout
|
||||
column
|
||||
align-center
|
||||
justify-center
|
||||
class="white--text"
|
||||
>
|
||||
<img :src="info.logo" alt="kubernetes" height="200">
|
||||
<img :src="info.logo" height="350">
|
||||
<h1 class="white--text mb-2 display-1 text-xs-center">${ info.message }</h1>
|
||||
<div class="subheading mb-3 text-xs-center">Served by <b>${ info.hostname }</b></div>
|
||||
<v-btn
|
||||
@@ -86,11 +89,11 @@
|
||||
tlColor1: 'grey',
|
||||
tlName2: '',
|
||||
tlColor2: 'grey',
|
||||
cuddleStyle: {
|
||||
backgroundColor: '#34577c'
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
document.getElementById('parallax-hero').style.height = '100vh'
|
||||
},
|
||||
created: function() {
|
||||
this.getInfo();
|
||||
this.timer = setInterval(this.getInfo, 3000)
|
||||
@@ -109,6 +112,9 @@
|
||||
}
|
||||
self.info = data
|
||||
self.info.color = data.color
|
||||
self.cuddleStyle = {
|
||||
backgroundColor: data.color
|
||||
}
|
||||
self.info.logo = data.logo
|
||||
document.title = data.hostname
|
||||
let verColor = (parseInt(data.version.split('.').reverse()[0], 10) % 2 === 0)
|
||||
|
||||
Reference in New Issue
Block a user