Compare commits

...

10 Commits

Author SHA1 Message Date
Stefan Prodan
07a524ba01 Merge pull request #460 from stefanprodan/release-6.11.0
Release 6.11.0
2026-03-06 19:50:57 +00:00
Stefan Prodan
5d97df9c89 Release 6.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-06 21:43:50 +02:00
Stefan Prodan
a8cadef09b Merge pull request #459 from stefanprodan/cosign-v3
Sign release artifacts with cosign v3
2026-03-06 19:32:20 +00:00
Stefan Prodan
32f6e3d8c9 Sign release artifacts with cosign v3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-06 21:31:06 +02:00
Stefan Prodan
77dc46241d Merge pull request #458 from matheuscscp/grpcroute
Introduce GRPCRoute in the Helm chart
2026-03-06 19:23:43 +00:00
Matheus Pimenta
3a31e973c0 Introduce GRPCRoute in the Helm chart
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-03-06 03:44:28 +00:00
Stefan Prodan
e15511a92d Merge pull request #456 from matheuscscp/check-grpc-tls
Introduce `--tls` flag for command `check grpc`
2026-03-03 08:36:06 +02:00
Matheus Pimenta
4656ca0517 Introduce --tls flag for command check grpc
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-03-03 03:02:20 +00:00
Stefan Prodan
1f66430364 Merge pull request #455 from matheuscscp/ws-check
Introduce podcli check ws command
2026-03-02 20:46:52 +02:00
Matheus Pimenta
117533e329 Introduce podcli check ws command
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-03-02 17:38:35 +00:00
18 changed files with 174 additions and 22 deletions

View File

@@ -19,8 +19,6 @@ jobs:
- uses: actions/checkout@v6
- uses: ./.github/actions/runner-cleanup
- uses: sigstore/cosign-installer@v4.0.0
with:
cosign-release: v2.6.1
- uses: fluxcd/flux2/action@v2.8.1
- uses: stefanprodan/timoni/actions/setup@v0.26.0
- name: Setup Notation CLI

View File

@@ -1,6 +1,6 @@
apiVersion: v1
version: 6.10.2
appVersion: 6.10.2
version: 6.11.0
appVersion: 6.11.0
name: podinfo
engine: gotpl
description: Podinfo Helm chart for Kubernetes

View File

@@ -0,0 +1,42 @@
{{- if .Values.grpcRoute.enabled -}}
{{- $fullName := include "podinfo.fullname" . -}}
{{- $grpcPort := .Values.service.grpcPort -}}
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
metadata:
name: {{ $fullName }}
namespace: {{ include "podinfo.namespace" . }}
labels:
{{- include "podinfo.labels" . | nindent 4 }}
{{- with .Values.grpcRoute.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.grpcRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- with .Values.grpcRoute.parentRefs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.grpcRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.grpcRoute.rules }}
- backendRefs:
- name: {{ $fullName }}
port: {{ $grpcPort }}
weight: 1
{{- with .matches }}
matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -8,7 +8,7 @@ backends: []
image:
repository: ghcr.io/stefanprodan/podinfo
tag: 6.10.2
tag: 6.11.0
pullPolicy: IfNotPresent
ui:

View File

@@ -8,7 +8,7 @@ backends: []
image:
repository: ghcr.io/stefanprodan/podinfo
tag: 6.10.2
tag: 6.11.0
pullPolicy: IfNotPresent
pullSecrets: []
@@ -232,6 +232,28 @@ httpRoute:
type: PathPrefix
value: /
# -- Expose the gRPC service via Gateway GRPCRoute
# Requires a Gateway controller with GRPCRoute support
# Docs https://gateway-api.sigs.k8s.io/guides/grpc-routing/
grpcRoute:
# GRPCRoute enabled.
enabled: false
# Add additional labels to the GRPCRoute.
additionalLabels: {}
# GRPCRoute annotations.
annotations: {}
# Which Gateways this Route is attached to.
parentRefs:
- name: gateway
sectionName: http
# namespace: default
# Hostnames matching HTTP header.
hostnames:
- podinfo.local
# List of rules applied.
rules:
- {}
# create Prometheus Operator monitor
serviceMonitor:
enabled: false

View File

@@ -12,10 +12,13 @@ import (
"strings"
"time"
"github.com/gorilla/websocket"
"github.com/spf13/cobra"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/health/grpc_health_v1"
"google.golang.org/grpc/status"
)
@@ -27,6 +30,7 @@ var (
body string
timeout time.Duration
grpcServiceName string
grpcTLS bool
)
var checkCmd = &cobra.Command{
@@ -63,6 +67,13 @@ var checkgRPCCmd = &cobra.Command{
RunE: runCheckgPRC,
}
var checkWsCmd = &cobra.Command{
Use: `ws [address]`,
Short: "WebSocket round-trip health check",
Example: ` check ws ws://localhost:9898/ws/echo --retry=1 --delay=2s --timeout=5s`,
RunE: runCheckWs,
}
func init() {
checkUrlCmd.Flags().StringVar(&method, "method", "GET", "HTTP method")
checkUrlCmd.Flags().StringVar(&body, "body", "", "HTTP POST/PUT content")
@@ -80,10 +91,16 @@ func init() {
checkgRPCCmd.Flags().DurationVar(&retryDelay, "delay", 1*time.Second, "wait duration between retries")
checkgRPCCmd.Flags().DurationVar(&timeout, "timeout", 5*time.Second, "timeout")
checkgRPCCmd.Flags().StringVar(&grpcServiceName, "service", "", "gRPC service name")
checkgRPCCmd.Flags().BoolVar(&grpcTLS, "tls", false, "use TLS for gRPC connection")
checkCmd.AddCommand(checkgRPCCmd)
checkCmd.AddCommand(checkCertCmd)
checkWsCmd.Flags().IntVar(&retryCount, "retry", 0, "times to retry the WebSocket check")
checkWsCmd.Flags().DurationVar(&retryDelay, "delay", 1*time.Second, "wait duration between retries")
checkWsCmd.Flags().DurationVar(&timeout, "timeout", 5*time.Second, "timeout")
checkCmd.AddCommand(checkWsCmd)
rootCmd.AddCommand(checkCmd)
}
@@ -262,6 +279,72 @@ func fmtContentLength(b int64) string {
return fmt.Sprintf("%.1f %cB", float64(b)/float64(div), "kMGTPE"[exp])
}
func runCheckWs(cmd *cobra.Command, args []string) error {
if retryCount < 0 {
return fmt.Errorf("--retry is required")
}
if len(args) < 1 {
return fmt.Errorf("address is required! example: check ws wss://localhost:9898/ws/echo")
}
address := args[0]
if !strings.HasPrefix(address, "ws://") && !strings.HasPrefix(address, "wss://") {
return fmt.Errorf("address must start with ws:// or wss://")
}
for n := 0; n <= retryCount; n++ {
if n != 0 {
time.Sleep(retryDelay)
}
dialer := websocket.Dialer{
HandshakeTimeout: timeout,
}
conn, _, err := dialer.Dial(address, nil)
if err != nil {
logger.Info("check failed",
zap.String("address", address),
zap.Error(err))
continue
}
msg := "podinfo-check"
start := time.Now()
conn.SetWriteDeadline(start.Add(timeout))
if err := conn.WriteMessage(websocket.TextMessage, []byte(msg)); err != nil {
conn.Close()
logger.Info("check failed",
zap.String("address", address),
zap.Error(err))
continue
}
conn.SetReadDeadline(time.Now().Add(timeout))
_, resp, err := conn.ReadMessage()
if err != nil {
conn.Close()
logger.Info("check failed",
zap.String("address", address),
zap.Error(err))
continue
}
rtt := time.Since(start)
conn.Close()
logger.Info("check succeed",
zap.String("address", address),
zap.Duration("round-trip", rtt),
zap.Int("response size", len(resp)))
os.Exit(0)
}
os.Exit(1)
return nil
}
func runCheckgPRC(cmd *cobra.Command, args []string) error {
if retryCount < 0 {
return fmt.Errorf("--retry is required")
@@ -271,12 +354,19 @@ func runCheckgPRC(cmd *cobra.Command, args []string) error {
}
address := args[0]
var creds grpc.DialOption
if grpcTLS {
creds = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
} else {
creds = grpc.WithTransportCredentials(insecure.NewCredentials())
}
for n := 0; n <= retryCount; n++ {
if n != 1 {
if n != 0 {
time.Sleep(retryDelay)
}
conn, err := grpc.Dial(address, grpc.WithInsecure())
conn, err := grpc.NewClient(address, creds)
if err != nil {
logger.Info("check failed",
zap.String("address", address),
@@ -291,13 +381,14 @@ func runCheckgPRC(cmd *cobra.Command, args []string) error {
if err != nil {
if stat, ok := status.FromError(err); ok && stat.Code() == codes.Unimplemented {
logger.Info("gPRC health protocol not implemented")
logger.Info("gRPC health protocol not implemented")
os.Exit(1)
} else {
logger.Info("check failed",
zap.String("address", address),
zap.Error(err))
}
conn.Close()
continue
}
@@ -305,7 +396,6 @@ func runCheckgPRC(cmd *cobra.Command, args []string) error {
logger.Info("check succeed",
zap.String("status", resp.GetStatus().String()))
os.Exit(0)
}
os.Exit(1)

View File

@@ -23,7 +23,7 @@ spec:
spec:
containers:
- name: backend
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@@ -23,7 +23,7 @@ spec:
restartPolicy: Never
containers:
- name: backup
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
command:
- /bin/sh

View File

@@ -23,7 +23,7 @@ spec:
restartPolicy: OnFailure
containers:
- name: healthcheck
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
command:
- /bin/sh

View File

@@ -23,7 +23,7 @@ spec:
restartPolicy: OnFailure
containers:
- name: healthcheck
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
command:
- /bin/sh

View File

@@ -25,7 +25,7 @@ spec:
serviceAccountName: database
containers:
- name: database
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
ports:
- name: db

View File

@@ -22,7 +22,7 @@ spec:
serviceAccountName: database
containers:
- name: database
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
ports:
- name: db

View File

@@ -23,7 +23,7 @@ spec:
spec:
containers:
- name: frontend
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@@ -25,7 +25,7 @@ spec:
serviceAccountName: webapp
containers:
- name: backend
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@@ -25,7 +25,7 @@ spec:
serviceAccountName: webapp
containers:
- name: frontend
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@@ -23,7 +23,7 @@ spec:
spec:
containers:
- name: podinfod
image: ghcr.io/stefanprodan/podinfo:6.10.2
image: ghcr.io/stefanprodan/podinfo:6.11.0
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@@ -1,4 +1,4 @@
package version
var VERSION = "6.10.2"
var VERSION = "6.11.0"
var REVISION = "unknown"

View File

@@ -9,7 +9,7 @@ package main
values: {
image: {
repository: "ghcr.io/stefanprodan/podinfo"
tag: "6.10.2"
tag: "6.11.0"
digest: ""
}
test: image: {