{"id":44836035,"url":"https://github.com/terotuomala/k8s-vite-react-example","last_synced_at":"2026-02-17T01:36:10.586Z","repository":{"id":50279212,"uuid":"326636460","full_name":"terotuomala/k8s-vite-react-example","owner":"terotuomala","description":"A simple example Single-page Application for Kubernetes using Vite + React.","archived":false,"fork":false,"pushed_at":"2026-02-12T14:47:38.000Z","size":3644,"stargazers_count":5,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-12T14:58:17.694Z","etag":null,"topics":["docker","kubernetes","kustomize","react","vite"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terotuomala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-04T09:45:17.000Z","updated_at":"2026-02-12T05:05:35.000Z","dependencies_parsed_at":"2023-10-26T02:26:12.355Z","dependency_job_id":"39be364a-cdae-4222-92d9-6856c52aeb0f","html_url":"https://github.com/terotuomala/k8s-vite-react-example","commit_stats":null,"previous_names":["terotuomala/k8s-vite-react-example","terotuomala/k8s-create-react-app-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/terotuomala/k8s-vite-react-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terotuomala%2Fk8s-vite-react-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terotuomala%2Fk8s-vite-react-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terotuomala%2Fk8s-vite-react-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terotuomala%2Fk8s-vite-react-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terotuomala","download_url":"https://codeload.github.com/terotuomala/k8s-vite-react-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terotuomala%2Fk8s-vite-react-example/sbom","scorecard":{"id":88044,"data":{"date":"2025-08-15T05:49:29Z","repo":{"name":"github.com/terotuomala/k8s-vite-react-example","commit":"e19639054adce9fcec5c039de291d4235219dded"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":6.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: RenovateBot: .github/renovate.json:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/build-and-release.yaml:56","Info: topLevel permissions set to 'read-all': .github/workflows/build-and-release.yaml:14","Info: topLevel permissions set to 'read-all': .github/workflows/lint.yaml:12","Info: topLevel permissions set to 'read-all': .github/workflows/scorecards.yml:18","Info: topLevel permissions set to 'read-all': .github/workflows/vulnerability-scan.yml:8"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yaml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/build-and-release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yaml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/build-and-release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yaml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/build-and-release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yaml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/build-and-release.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yaml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/lint.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yaml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/lint.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/lint.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yaml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/lint.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/lint.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/vulnerability-scan.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/terotuomala/k8s-vite-react-example/vulnerability-scan.yml/main?enable=pin","Info:   7 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   9 third-party GitHubAction dependencies pinned","Info:   4 out of   4 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/build-and-release.yaml:17"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: found contributions from: mend"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"CI-Tests","score":10,"reason":"16 out of 16 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-08-15T07:20:28.897Z","repository_id":50279212,"created_at":"2025-08-15T07:20:28.898Z","updated_at":"2025-08-15T07:20:28.898Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29529513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"ssl_error","status_checked_at":"2026-02-17T00:54:25.811Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","kubernetes","kustomize","react","vite"],"created_at":"2026-02-17T01:36:06.930Z","updated_at":"2026-02-17T01:36:10.549Z","avatar_url":"https://github.com/terotuomala.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes Vite + React Example App\r\n\r\n[![Build and Release](https://github.com/terotuomala/k8s-create-react-app-example/workflows/build-and-release/badge.svg)](https://github.com/terotuomala/k8s-create-react-app-example/actions)\r\n[![Vulnerability Scan](https://github.com/terotuomala/k8s-create-react-app-example/workflows/vulnerability-scan/badge.svg)](https://github.com/terotuomala/k8s-create-react-app-example/actions)\r\n[![Lint](https://github.com/terotuomala/k8s-create-react-app-example/workflows/lint/badge.svg)](https://github.com/terotuomala/k8s-create-react-app-example/actions)\r\n\r\n\u003e :information_source: This project is a part of [GitOps workflow example using Flux2](https://github.com/terotuomala/gitops-flux2-example) which includes Kubernetes manifests for NGINX Ingress Controller as well as handles Continuous Delivery.\r\n\r\nA simple example Single-page Application for Kubernetes using Vite + React.\r\n\r\n\u003c!-- TABLE OF CONTENTS --\u003e\r\n## Table of Contents\r\n* [Overview](#mag-overview)\r\n* [Features](#rocket-features)\r\n  * [Dockerfile optimization](#dockerfile-optimization)\r\n  * [SHA256 digest pinned Docker image tags](#sha256-digest-pinned-docker-images)\r\n  * [Docker image and npm dependency updates](#docker-image-and-npm-dependency-updates)\r\n  * [Vulnerability scanning](#vulnerability-scanning)\r\n  * [Static file Caching](#static-file-caching)\r\n* [Kustomize configuration](#pencil-kustomize-configuration)\r\n* [Local development](#keyboard-local-development)\r\n\r\n\u003c!-- OVERVIEW --\u003e\r\n## :mag: Overview\r\nIn a nutshell the application provides a user interface for displaying most popular GitHub repositories which the [REST API](https://github.com/terotuomala/k8s-express-api-example) offers.\r\n\r\n\u003c!-- FEATURES --\u003e\r\n## :rocket: Features\r\n- Optimized Dockerfile using multi-stage builds\r\n- SHA pinned Docker image tags with automated update using [Renovate](https://docs.renovatebot.com)\r\n- Automated vulnerability scan of the Docker image and npm dependencies using [Trivy](https://github.com/aquasecurity/trivy)\r\n- YAML validation using [yamllint](https://github.com/adrienverge/yamllint)\r\n- Static file Caching utilizing [long term caching techniques](https://create-react-app.dev/docs/production-build/#static-file-caching) using [serve](https://github.com/vercel/serve)\r\n- Kubernetes configuration customization using [Kustomize](https://github.com/kubernetes-sigs/kustomize)\r\n- Network traffic flow control using [Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/)\r\n\r\n### Dockerfile optimization\r\n- In order to keep the Docker image size optimal a multi-stage builds is used\r\n- The application is bundled and build into production mode as well as `serve` is installed in the `base` stage. \r\n- Only the `dist` folder and `serve` related files are copied from the `base` state to `release` stage in order to have minimum sized layers\r\n- Only the layers from the `release` stage are pushed when the Docker image is build\r\n\r\n### SHA256 digest pinned Docker images\r\nSHA256 digest pinning is used to achieve reliable and reproducable builds. Using digest as the image's primary identifier instead of using a tag makes sure that specific version of the image is used.\r\n\r\n### Docker image and npm dependency updates\r\nIn order to receive Docker image and npm dependency updates [Renovate](https://docs.renovatebot.com) is used to create a pull request when: \r\n\r\n- Newer digest from [chainguard/node](https://registry.hub.docker.com/r/chainguard/node/tags) is available on Docker Hub \r\n- `Minor` or `Patch` update of a npm dependency is available\r\n\r\n### Vulnerability scanning\r\nIn order to regularly scan Docker image and npm dependencies for vulnerabilities a scheduled [job](https://github.com/terotuomala/k8s-express-api-example/blob/main/.github/workflows/vulnerability-scan.yml) is used to build the Docker image and scan it's content using [Trivy](https://github.com/aquasecurity/trivy).\r\n\r\n### Static file Caching\r\nWhen building Create React App it makes sure that JavaScript and CSS files inside `dist/assets` folder will have a unique hash appended to the filename which makes possible to use [long term caching techniques](https://create-react-app.dev/docs/production-build/#static-file-caching):\r\n\r\n- `Cache-Control: max-age=31536000` for `dist/assets`\r\n- `Cache-Control: no-cache` for `index.html` \r\n\r\nare used to avoid browser re-downloading the assets if the file contents haven't changed and to make sure that updated `index.html` is always used. The headers are defined in [serve.json](https://github.com/terotuomala/k8s-create-react-app-example/blob/main/serve.json). \r\n\r\n## :pencil: Kustomize configuration\r\nKustomize configuration is based on [Directory Structure Based Layout](https://kubectl.docs.kubernetes.io/pages/app_composition_and_deployment/structure_directories.html) in order to use staging and production environments with different configuration.\r\n\r\n```sh\r\n├── base\r\n│   ├── deployment.yaml\r\n│   ├── hpa.yaml\r\n│   ├── ingress.yaml\r\n│   ├── kustomization.yaml\r\n│   ├── netpol-egress.yaml\r\n│   ├── netpol-ingress.yaml\r\n│   ├── pdb.yaml\r\n│   └── service.yaml\r\n└── staging\r\n    ├── hpa-patch.yaml\r\n    ├── kustomization.yaml\r\n    ├── namespace.yaml\r\n    └── pdb-patch.yaml\r\n```\r\n\r\n\u003c!-- LOCAL DEVELOPMENT --\u003e\r\n## :keyboard: Local development\r\nStart the app in development mode which will automatically reload if you make changes to the code:\r\n```sh\r\n$ pnpm run dev\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterotuomala%2Fk8s-vite-react-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterotuomala%2Fk8s-vite-react-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterotuomala%2Fk8s-vite-react-example/lists"}