Compare commits

..

5 Commits

Author SHA1 Message Date
Martin Šalata
073514be65 Remove whitespace 2021-05-26 09:44:13 +02:00
Martin Šalata
0189cb74e5 Set an existing version for chart-releaser-action 2021-05-26 09:43:53 +02:00
Martin Šalata
a678d5f149 Remove unnecessary comments 2021-05-26 09:40:59 +02:00
Martin Šalata
b35f219c4b Make github release from release/legacy-csr 2021-05-26 09:37:26 +02:00
Martin Šalata
f023dc9264 Use certificates.k8s.io/v1beta1 api version for legacy k8s cluster 2021-05-26 09:26:29 +02:00
6 changed files with 22 additions and 49 deletions

View File

@@ -1 +1 @@
0.0.12
0.0.11

View File

@@ -7,7 +7,4 @@ RUN make build
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
RUN addgroup -S imagepullsecret-injector-group && adduser -S imagepullsecret-injector-user -G imagepullsecret-injector-group
USER imagepullsecret-injector-user
ENTRYPOINT ["imagepullsecret-injector"]
ENTRYPOINT ["imagepullsecret-injector"]

View File

@@ -1,9 +1,6 @@
FROM alpine:3.13.4
RUN addgroup -S imagepullsecret-injector-group && adduser -S imagepullsecret-injector-user -G imagepullsecret-injector-group \
&& apk add bash curl openssl jq \
RUN apk add bash curl openssl \
&& curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod 755 ./kubectl \
&& mv ./kubectl /usr/bin/kubectl
USER imagepullsecret-injector-user

View File

@@ -2,22 +2,6 @@ apiVersion: v2
name: imagepullsecret-injector
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.21
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.0.12
version: 0.0.20-legacy
appVersion: 0.0.11

View File

@@ -83,27 +83,23 @@ echo "Deleting old CertificateSigningRequests"
kubectl delete csr ${csrName} 2>/dev/null || true
echo "Creating new CertificateSigningRequests"
# create server cert/key CSR and send to k8s API
jq -n --arg request "$(< "${tmpdir}"/server.csr base64)" \
--arg namespace "$namespace" \
--arg csrName "$csrName" '{
apiVersion: "certificates.k8s.io/v1",
kind: "CertificateSigningRequest",
metadata: {
name: $csrName,
namespace: $namespace
},
spec: {
signerName: "kubernetes.io/kubelet-serving",
groups: ["system:authenticated"],
request: $request,
usages: [
"digital signature",
"key encipherment",
"server auth"
]
}
}' | kubectl create -f -
# create server cert/key CSR and send to k8s API
cat <<EOF | kubectl create -f -
apiVersion: certificates.k8s.io/v1beta1
kind: CertificateSigningRequest
metadata:
name: ${csrName}
namespace: ${namespace}
spec:
signerName: kubernetes.io/kubelet-serving
groups:
- system:authenticated
request: $(< "${tmpdir}"/server.csr base64 | tr -d '\n')
usages:
- digital signature
- key encipherment
- server auth
EOF
# verify CSR has been created
while true; do

View File

@@ -14,7 +14,6 @@ imagepullsecretInjector:
dockerconfigjsonRef:
secretName: acr-dockerconfigjson-source
secretNamespace: ""
targetSecretName: acr-dockerconfigjson
ignoreSecretCreationError: false
allSaNames: false