Skip to content

Commit

Permalink
refactor: run merger with non-root user by default
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Sep 14, 2024
1 parent cf83a24 commit 2faee16
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
FROM ubuntu:latest as base
RUN useradd -u 1001 merger

FROM scratch
ENTRYPOINT ["/kustomize-plugin-merger"]
COPY --from=base /etc/passwd /etc/passwd
COPY kustomize-plugin-merger /
USER 1001
ENTRYPOINT ["/kustomize-plugin-merger"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A Kustomize generator plugin to merge YAML files seamlessly for real-world use c
- [Why](#why)
- [Features](#features)
- [Options](#options)
- [Common use cases](#common-use-cases)
- [Examples](#examples)
- [1. Generate multiple manifests from a single base](#1-generate-multiple-manifests-from-a-single-base)
- [2. Merge non-manifest files and store them into ConfigMap or Secret](#2-merge-non-manifest-files-and-store-them-into-configmap-or-secret)
- [3. Merge lists in manifests without schema or a unique identifier](#3-merge-lists-in-manifests-without-schema-or-a-unique-identifier)
Expand Down Expand Up @@ -114,7 +114,7 @@ spec:
```
## Common use cases
## Examples
This section shows a couple of use cases where Merger can help.
Expand Down
2 changes: 1 addition & 1 deletion examples/long-omni-manifest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ spec:
## Build
```shell
kustomize build --enable-alpha-plugins --as-current-user .
kustomize build --enable-alpha-plugins .
```

## Output
Expand Down
2 changes: 1 addition & 1 deletion examples/manifest-lists-without-schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ spec:
## Build
```shell
kustomize build --enable-alpha-plugins --as-current-user .
kustomize build --enable-alpha-plugins .
```

## Output
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple-manifests-from-single-file/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ spec:
## Build
```shell
kustomize build --enable-alpha-plugins --as-current-user .
kustomize build --enable-alpha-plugins .
```

## Output
Expand Down
2 changes: 1 addition & 1 deletion examples/non-manifest-into-configmap-or-secret/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ spec:
## Build
```shell
kustomize build --enable-alpha-plugins --as-current-user .
kustomize build --enable-alpha-plugins .
```

## Output
Expand Down

0 comments on commit 2faee16

Please sign in to comment.