mirror of
https://github.com/ysoftdevs/imagepullsecret-injector.git
synced 2026-01-14 07:43:50 +01:00
Compare commits
3 Commits
release/le
...
imagepulls
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56595e3e72 | ||
|
|
6c5bd77b69 | ||
|
|
c999960415 |
5
.github/workflows/release-chart.yaml
vendored
5
.github/workflows/release-chart.yaml
vendored
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/legacy-csr
|
||||
paths:
|
||||
- 'charts/**'
|
||||
|
||||
@@ -13,8 +14,6 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
@@ -47,6 +46,6 @@ jobs:
|
||||
|
||||
- name: Run chart-releaser
|
||||
if: steps.helm_version_checker.outcome == 'success'
|
||||
uses: helm/chart-releaser-action@master
|
||||
uses: helm/chart-releaser-action@v1.2.1
|
||||
env:
|
||||
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
@@ -15,7 +15,7 @@ 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.20
|
||||
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
|
||||
|
||||
@@ -83,23 +83,27 @@ 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
|
||||
cat <<EOF | kubectl create -f -
|
||||
apiVersion: certificates.k8s.io/v1
|
||||
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
|
||||
# create server cert/key CSR and send to k8s API
|
||||
jq -n --arg request "$(< "${tmpdir}"/server.csr base64 -w0)" \
|
||||
--arg namespace "$namespace" \
|
||||
--arg csrName "$csrName" '{
|
||||
apiVersion: "certificates.k8s.io/v1beta1",
|
||||
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 -
|
||||
|
||||
# verify CSR has been created
|
||||
while true; do
|
||||
|
||||
Reference in New Issue
Block a user