[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9957":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":15,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},9957,"podinfo","stefanprodan\u002Fpodinfo","stefanprodan","Go microservice template for Kubernetes","",null,"Go",5917,1872,44,21,0,7,1,71.42,"Apache License 2.0",false,"master",true,[25,26,27,28,29,30,31,32],"cuelang","e2e-testing","gitops","golang","helm","kubernetes","kustomize","microservice","2026-06-12 04:00:47","# podinfo\n\n[![e2e](https:\u002F\u002Fgithub.com\u002Fstefanprodan\u002Fpodinfo\u002Fworkflows\u002Fe2e\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fstefanprodan\u002Fpodinfo\u002Fblob\u002Fmaster\u002F.github\u002Fworkflows\u002Fe2e.yml)\n[![test](https:\u002F\u002Fgithub.com\u002Fstefanprodan\u002Fpodinfo\u002Fworkflows\u002Ftest\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fstefanprodan\u002Fpodinfo\u002Fblob\u002Fmaster\u002F.github\u002Fworkflows\u002Ftest.yml)\n[![cve-scan](https:\u002F\u002Fgithub.com\u002Fstefanprodan\u002Fpodinfo\u002Fworkflows\u002Fcve-scan\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fstefanprodan\u002Fpodinfo\u002Fblob\u002Fmaster\u002F.github\u002Fworkflows\u002Fcve-scan.yml)\n[![Go Report Card](https:\u002F\u002Fgoreportcard.com\u002Fbadge\u002Fgithub.com\u002Fstefanprodan\u002Fpodinfo)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fstefanprodan\u002Fpodinfo)\n[![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fstefanprodan\u002Fpodinfo)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fstefanprodan\u002Fpodinfo)\n\nPodinfo is a tiny web application made with Go that showcases best practices of running microservices in Kubernetes.\nPodinfo is used by CNCF projects like [Flux](https:\u002F\u002Fgithub.com\u002Ffluxcd\u002Fflux2) and [Flagger](https:\u002F\u002Fgithub.com\u002Ffluxcd\u002Fflagger)\nfor end-to-end testing and workshops.\n\nSpecifications:\n\n* Health checks (readiness and liveness)\n* Graceful shutdown on interrupt signals\n* File watcher for secrets and configmaps\n* Instrumented with Prometheus and Open Telemetry\n* Structured logging with zap \n* 12-factor app with viper\n* Fault injection (random errors and latency)\n* Swagger docs\n* Timoni, Helm and Kustomize installers\n* End-to-End testing with Kubernetes Kind and Helm\n* Multi-arch container image with Docker buildx and GitHub Actions\n* Container image signing with Sigstore cosign\n* SBOMs and SLSA Provenance embedded in the container image\n* CVE scanning with govulncheck\n\nWeb API:\n\n* `GET \u002F` prints runtime information\n* `GET \u002Fversion` prints podinfo version and git commit hash \n* `GET \u002Fmetrics` return HTTP requests duration and Go runtime metrics\n* `GET \u002Fhealthz` used by Kubernetes liveness probe\n* `GET \u002Freadyz` used by Kubernetes readiness probe\n* `POST \u002Freadyz\u002Fenable` signals the Kubernetes LB that this instance is ready to receive traffic\n* `POST \u002Freadyz\u002Fdisable` signals the Kubernetes LB to stop sending requests to this instance\n* `GET \u002Fstatus\u002F{code}` returns the status code\n* `GET \u002Fpanic` crashes the process with exit code 255\n* `POST \u002Fecho` forwards the call to the backend service and echos the posted content \n* `GET \u002Fenv` returns the environment variables as a JSON array\n* `GET \u002Fheaders` returns a JSON with the request HTTP headers\n* `GET \u002Fdelay\u002F{seconds}` waits for the specified period\n* `POST \u002Ftoken` issues a JWT token valid for one minute `JWT=$(curl -sd 'anon' podinfo:9898\u002Ftoken | jq -r .token)`\n* `GET \u002Ftoken\u002Fvalidate` validates the JWT token `curl -H \"Authorization: Bearer $JWT\" podinfo:9898\u002Ftoken\u002Fvalidate`\n* `GET \u002Fconfigs` returns a JSON with configmaps and\u002For secrets mounted in the `config` volume\n* `POST\u002FPUT \u002Fcache\u002F{key}` saves the posted content to Redis\n* `GET \u002Fcache\u002F{key}` returns the content from Redis if the key exists\n* `DELETE \u002Fcache\u002F{key}` deletes the key from Redis if exists\n* `POST \u002Fstore` writes the posted content to disk at \u002Fdata\u002Fhash and returns the SHA1 hash of the content\n* `GET \u002Fstore\u002F{hash}` returns the content of the file \u002Fdata\u002Fhash if exists\n* `GET \u002Fws\u002Fecho` echos content via websockets `podcli ws ws:\u002F\u002Flocalhost:9898\u002Fws\u002Fecho`\n* `GET \u002Fchunked\u002F{seconds}` uses `transfer-encoding` type `chunked` to give a partial response and then waits for the specified period\n* `GET \u002Fswagger.json` returns the API Swagger docs, used for Linkerd service profiling and Gloo routes discovery\n\ngRPC API:\n\n* `\u002Fgrpc.health.v1.Health\u002FCheck` health checking\n* `\u002Fgrpc.EchoService\u002FEcho` echos the received content\n* `\u002Fgrpc.VersionService\u002FVersion` returns podinfo version and Git commit hash\n* `\u002Fgrpc.DelayService\u002FDelay` returns a successful response after the given seconds in the body of gRPC request\n* `\u002Fgrpc.EnvService\u002FEnv` returns environment variables as a JSON array\n* `\u002Fgrpc.HeaderService\u002FHeader` returns the headers present in the gRPC request. Any custom header can also be given as a part of request and that can be returned using this API\n* `\u002Fgrpc.InfoService\u002FInfo` returns the runtime information\n* `\u002Fgrpc.PanicService\u002FPanic` crashes the process with gRPC status code as '1 CANCELLED'\n* `\u002Fgrpc.StatusService\u002FStatus` returns the gRPC Status code given in the request body\n* `\u002Fgrpc.TokenService\u002FTokenGenerate` issues a JWT token valid for one minute\n* `\u002Fgrpc.TokenService\u002FTokenValidate` validates the JWT token\n\nWeb UI:\n\n![podinfo-ui](https:\u002F\u002Fraw.githubusercontent.com\u002Fstefanprodan\u002Fpodinfo\u002Fgh-pages\u002Fscreens\u002Fpodinfo-ui-v3.png)\n\nTo access the Swagger UI open `\u003Cpodinfo-host>\u002Fswagger\u002Findex.html` in a browser.\n\n### Guides\n\n* [Getting started with Timoni](https:\u002F\u002Ftimoni.sh\u002Fquickstart\u002F)\n* [Getting started with Flux](https:\u002F\u002Ffluxcd.io\u002Fflux\u002Fget-started\u002F)\n* [Progressive Deliver with Flagger and Linkerd](https:\u002F\u002Fdocs.flagger.app\u002Ftutorials\u002Flinkerd-progressive-delivery)\n* [Automated canary deployments with Kubernetes Gateway API](https:\u002F\u002Fdocs.flagger.app\u002Ftutorials\u002Fgatewayapi-progressive-delivery)\n\n### Install\n\nTo install Podinfo on Kubernetes the minimum required version is **Kubernetes v1.23**.\n\n#### Timoni\n\nInstall with [Timoni](https:\u002F\u002Ftimoni.sh):\n\n```bash\ntimoni -n default apply podinfo oci:\u002F\u002Fghcr.io\u002Fstefanprodan\u002Fmodules\u002Fpodinfo\n```\n\n#### Helm\n\nInstall from github.io:\n\n```bash\nhelm repo add podinfo https:\u002F\u002Fstefanprodan.github.io\u002Fpodinfo\n\nhelm upgrade --install --wait frontend \\\n--namespace test \\\n--set replicaCount=2 \\\n--set backend=http:\u002F\u002Fbackend-podinfo:9898\u002Fecho \\\npodinfo\u002Fpodinfo\n\nhelm test frontend --namespace test\n\nhelm upgrade --install --wait backend \\\n--namespace test \\\n--set redis.enabled=true \\\npodinfo\u002Fpodinfo\n```\n\nInstall from ghcr.io:\n\n```bash\nhelm upgrade --install --wait podinfo --namespace default \\\noci:\u002F\u002Fghcr.io\u002Fstefanprodan\u002Fcharts\u002Fpodinfo\n```\n\n#### Kustomize\n\n```bash\nkubectl apply -k github.com\u002Fstefanprodan\u002Fpodinfo\u002F\u002Fkustomize\n```\n\n#### Docker\n\n```bash\ndocker run -dp 9898:9898 stefanprodan\u002Fpodinfo\n```\n\n### Continuous Delivery\n\nIn order to install podinfo on a Kubernetes cluster and keep it up to date with the latest\nrelease in an automated manner, you can use [Flux](https:\u002F\u002Ffluxcd.io).\n\nInstall the Flux CLI on MacOS and Linux using Homebrew:\n\n```sh\nbrew install fluxcd\u002Ftap\u002Fflux\n```\n\nInstall the Flux controllers needed for Helm operations:\n\n```sh\nflux install \\\n--namespace=flux-system \\\n--network-policy=false \\\n--components=source-controller,helm-controller\n```\n\nAdd podinfo's Helm repository to your cluster and\nconfigure Flux to check for new chart releases every ten minutes:\n\n```sh\nflux create source helm podinfo \\\n--namespace=default \\\n--url=https:\u002F\u002Fstefanprodan.github.io\u002Fpodinfo \\\n--interval=10m\n```\n\nCreate a `podinfo-values.yaml` file locally:\n\n```sh\ncat > podinfo-values.yaml \u003C\u003CEOL\nreplicaCount: 2\nresources:\n  limits:\n    memory: 256Mi\n  requests:\n    cpu: 100m\n    memory: 64Mi\nEOL\n```\n\nCreate a Helm release for deploying podinfo in the default namespace:\n\n```sh\nflux create helmrelease podinfo \\\n--namespace=default \\\n--source=HelmRepository\u002Fpodinfo \\\n--release-name=podinfo \\\n--chart=podinfo \\\n--chart-version=\">5.0.0\" \\\n--values=podinfo-values.yaml\n```\n\nBased on the above definition, Flux will upgrade the release automatically\nwhen a new version of podinfo is released. If the upgrade fails, Flux\ncan [rollback](https:\u002F\u002Ftoolkit.fluxcd.io\u002Fcomponents\u002Fhelm\u002Fhelmreleases\u002F#configuring-failure-remediation)\nto the previous working version.\n\nYou can check what version is currently deployed with:\n\n```sh\nflux get helmreleases -n default\n```\n\nTo delete podinfo's Helm repository and release from your cluster run:\n\n```sh\nflux -n default delete source helm podinfo\nflux -n default delete helmrelease podinfo\n```\n\nIf you wish to manage the lifecycle of your applications in a **GitOps** manner, check out\nthis [workflow example](https:\u002F\u002Fgithub.com\u002Ffluxcd\u002Fflux2-kustomize-helm-example)\nfor multi-env deployments with Flux, Kustomize and Helm.\n","Podinfo 是一个用 Go 语言编写的微服务模板，专为在 Kubernetes 上运行而设计。它具备健康检查、优雅关闭、配置文件监控等核心功能，并且支持 Prometheus 和 Open Telemetry 监控、结构化日志记录以及故障注入等功能。此外，该项目还提供了多架构容器镜像构建、容器镜像签名、SBOM 和 SLSA 证明嵌入等高级特性。Podinfo 非常适合用于 Kubernetes 环境下的微服务开发、测试和演示，尤其是在需要进行端到端测试或技术培训的场景中，如与 CNCF 项目 Flux 和 Flagger 的集成使用。",2,"2026-06-11 03:25:45","top_topic"]