mirror of
https://github.com/ysoftdevs/secret-duplicator.git
synced 2026-07-10 18:22:37 +02:00
Fixed dockerfile build
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
The responsibility of this webhook is to patch all newly created/updated namespaces so that they contain predefined empty secret with given annotation.
|
The responsibility of this webhook is to patch all newly created/updated namespaces so that they contain predefined empty secret with given annotation.
|
||||||
|
|
||||||
This repo produces one helm chart available via helm repository https://ysoftdevs.github.io/imagepullsecret-injector. There are also 2 docker images:
|
This repo produces one helm chart available via helm repository https://ysoftdevs.github.io/secret-duplicator. There are also 2 docker images:
|
||||||
- `ghcr.io/ysoftdevs/imagepullsecret-injector/imagepullsecret-injector` - the image containing the webhook itself
|
- `ghcr.io/ysoftdevs/secret-duplicator/secret-duplicator` - the image containing the webhook itself
|
||||||
- `ghcr.io/ysoftdevs/imagepullsecret-injector/webhook-cert-generator` - helper image responsible for (re)generating the certificates
|
- `ghcr.io/ysoftdevs/secret-duplicator/webhook-cert-generator` - helper image responsible for (re)generating the certificates
|
||||||
|
|
||||||
## Helm description
|
## Helm description
|
||||||
The helm chart consists of 2 parts: the certificate generator and the webhook configuration itself.
|
The helm chart consists of 2 parts: the certificate generator and the webhook configuration itself.
|
||||||
@@ -26,9 +26,9 @@ Of note is also a fact that the chart runs a lookup to the connected cluster to
|
|||||||
## Running locally
|
## Running locally
|
||||||
1. Create the prerequisite resources:
|
1. Create the prerequisite resources:
|
||||||
```bash
|
```bash
|
||||||
kubectl create ns secret-replicator
|
kubectl create ns secret-duplicator
|
||||||
|
|
||||||
kubectl create secret -n secret-replicator \
|
kubectl create secret -n secret-duplicator \
|
||||||
generic acr-dockerconfigjson-source \
|
generic acr-dockerconfigjson-source \
|
||||||
--type=kubernetes.io/dockerconfigjson \
|
--type=kubernetes.io/dockerconfigjson \
|
||||||
--from-literal=.dockerconfigjson='<your .dockerconfigjson configuration file>'
|
--from-literal=.dockerconfigjson='<your .dockerconfigjson configuration file>'
|
||||||
@@ -37,17 +37,17 @@ Of note is also a fact that the chart runs a lookup to the connected cluster to
|
|||||||
1. Build the images and run the chart
|
1. Build the images and run the chart
|
||||||
``` bash
|
``` bash
|
||||||
make build-image
|
make build-image
|
||||||
helm upgrade -i secret-replicator \
|
helm upgrade -i secret-duplicator \
|
||||||
-n secret-replicator \
|
-n secret-duplicator \
|
||||||
charts/secret-replicator
|
charts/secret-duplicator
|
||||||
```
|
```
|
||||||
Alternatively, you can use the pre-built, publicly available helm chart and docker images:
|
Alternatively, you can use the pre-built, publicly available helm chart and docker images:
|
||||||
```bash
|
```bash
|
||||||
helm repo add secret-replicator https://ysoftdevs.github.io/secret-replicator
|
helm repo add secret-duplicator https://ysoftdevs.github.io/secret-duplicator
|
||||||
helm repo update
|
helm repo update
|
||||||
helm upgrade -i secret-replicator \
|
helm upgrade -i secret-duplicator \
|
||||||
-n secret-replicator \
|
-n secret-duplicator \
|
||||||
secret-replicator/secret-replicator
|
secret-duplicator/secret-duplicator
|
||||||
```
|
```
|
||||||
|
|
||||||
1. To test whether everything works, you can run
|
1. To test whether everything works, you can run
|
||||||
|
|||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
FROM golang:1.15 AS builder
|
FROM golang:1.15 AS builder
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/ysoftdevs/imagepullsecret-injector
|
WORKDIR /go/src/github.com/ysoftdevs/secret-duplicator
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN make build
|
RUN make build
|
||||||
|
|
||||||
FROM alpine:3.13.4 as base
|
FROM alpine:3.13.4 as base
|
||||||
COPY --from=builder /go/src/github.com/ysoftdevs/imagepullsecret-injector/build/_output/bin/imagepullsecret-injector /usr/local/bin/imagepullsecret-injector
|
COPY --from=builder /go/src/github.com/ysoftdevs/secret-duplicator/build/_output/bin/secret-duplicator /usr/local/bin/secret-duplicator
|
||||||
|
|
||||||
ENTRYPOINT ["imagepullsecret-injector"]
|
ENTRYPOINT ["secret-duplicator"]
|
||||||
Reference in New Issue
Block a user