Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This project is currently not accepting contributions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Portions derived from github.com/morvencao/kube-sidecar-injector (Apache License 2.0); modified by NVIDIA.
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Build the sidecar-injector binary
FROM golang:1.26.7 AS builder

Expand All @@ -16,6 +19,10 @@ COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${BUILDPLATFORM} go build -a -o simple-sidecar ./cmd

# Third-party source for the notices in THIRD-PARTY.txt: vendor the exact module set
# that was just compiled and pack it (see /usr/share/oss-source in the final stage)
RUN go mod vendor && tar -czf /workspace/third-party-src.tar.gz -C /workspace vendor


# OSRB-approved base; CGO_ENABLED=0 binary needs no libc. Already runs as
# non-root (uid 1000), so the explicit USER is no longer required.
Expand All @@ -29,4 +36,8 @@ WORKDIR /
# install binary
COPY --from=builder /workspace/simple-sidecar .

# Third-party notices and the corresponding source (license compliance; MPL-2.0 §3.2)
COPY THIRD-PARTY.txt /THIRD-PARTY.txt
COPY --from=builder /workspace/third-party-src.tar.gz /usr/share/oss-source/third-party-src.tar.gz

ENTRYPOINT ["/simple-sidecar"]
3 changes: 3 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.


Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Simple Sidecar (Injector)

This repo was originally forked from [morvencao's kube-sidecar-injector](https://github.com/morvencao/kube-sidecar-injector). It's been productionized and turned into a simple generic Kubernetes sidecar injector (using a [Kubernetes MutatingAdmissionWebhook](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook)).
This repo was originally forked from [morvencao's kube-sidecar-injector](https://github.com/morvencao/kube-sidecar-injector) (Apache License 2.0; see [THIRD-PARTY.txt](THIRD-PARTY.txt) for the derived files and all third-party notices). It's been productionized and turned into a simple generic Kubernetes sidecar injector (using a [Kubernetes MutatingAdmissionWebhook](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook)).


## Quick Start
Expand Down Expand Up @@ -210,5 +210,12 @@ This let's you leverage functionality that might be provided by your injected co

Follow the documentation related to [installing cert-manager](https://cert-manager.io/docs/) and then using it's [CA Injector functionality](https://cert-manager.io/docs/concepts/ca-injector/.

Setup a [self signed certificate](https://cert-manager.io/docs/configuration/selfsigned/) which will auto update to the secret location you've configured simple-sidecar to use.
Setup a [self signed certificate](https://cert-manager.io/docs/configuration/selfsigned/) which will auto update to the secret location you've configured simple-sidecar to use.

## Contributing

This project is currently not accepting contributions.

## License

Apache License 2.0 — see [LICENSE](LICENSE). Third-party notices: [THIRD-PARTY.txt](THIRD-PARTY.txt).
4,565 changes: 4,565 additions & 0 deletions THIRD-PARTY.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions charts/simple-sidecar/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{{/*
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/}}
{{/*
Expand the name of the chart.
*/}}
{{- define "simple-sidecar.name" -}}
Expand Down
4 changes: 4 additions & 0 deletions cmd/cert.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
Derived unmodified from github.com/morvencao/kube-sidecar-injector (cmd/cert.go), licensed under the Apache License 2.0.
SPDX-License-Identifier: Apache-2.0
*/
package main

import (
Expand Down
5 changes: 5 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Portions derived from github.com/morvencao/kube-sidecar-injector (Apache License 2.0); modified by NVIDIA.
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/
package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/certs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Exit on error
set -e
Expand Down
5 changes: 5 additions & 0 deletions pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Portions derived from github.com/morvencao/kube-sidecar-injector (Apache License 2.0); modified by NVIDIA.
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/
package webhook

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/webhook/webhook_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/
package webhook

import (
Expand Down
4 changes: 4 additions & 0 deletions tester/tester.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/
package main

import (
Expand Down
Loading