Skip to content

Commit d058018

Browse files
Merge pull request #390 from Hamidhasan/main
Update charts/aws-pca-issuer/README.md using `make helm-docs`
2 parents 8bc87f7 + 7b1ae62 commit d058018

File tree

6 files changed

+152
-72
lines changed

6 files changed

+152
-72
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Workflow to sync helm chart README.md when values.yml is updated
2+
name: Sync Helm Chart README.md
3+
4+
on:
5+
pull_request_target:
6+
paths:
7+
- 'charts/aws-pca-issuer/values.yaml'
8+
workflow_dispatch:
9+
10+
env:
11+
GITHUB_USER_NAME: github-actions
12+
GITHUB_USER_EMAIL: [email protected]
13+
14+
jobs:
15+
sync-helm-chart-doc:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
repository: ${{ github.event.pull_request.head.repo.full_name }}
22+
ref: ${{ github.head_ref }}
23+
24+
- name: Set up Go
25+
uses: actions/setup-go@v4
26+
with:
27+
go-version: '1.24'
28+
29+
- name: Run helm-docs via Makefile
30+
id: run-helm-docs
31+
continue-on-error: true
32+
run: |
33+
mkdir -p $(pwd)/bin
34+
export PATH=$(pwd)/bin:$PATH
35+
echo "Regenerating charts/aws-pca-issuer/README.md since charts/aws-pca-issuer/values.yaml has updated."
36+
make helm-docs
37+
MAKE_EXIT_CODE=$?
38+
echo "Make exit code: $MAKE_EXIT_CODE"
39+
exit $MAKE_EXIT_CODE
40+
41+
- name: Update pull request with new Helm README.md
42+
if: ${{ github.event_name == 'pull_request_target' && steps.run-helm-docs.outcome == 'success' }}
43+
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 #v5.2.0
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
branch: ${{ github.head_ref }}
48+
create_branch: false
49+
commit_author: "${{ env.GITHUB_USER_NAME }} <${{ env.GITHUB_USER_EMAIL }}>"
50+
commit_message: |
51+
Sync charts/aws-pca-issuer/README.md in pull-request ${{ github.event.pull_request.number }}
52+
53+
Signed-off-by: ${{ env.GITHUB_USER_NAME }} <${{ env.GITHUB_USER_EMAIL }}>
54+
55+
- name: Comment on pull request that the README is updated
56+
if: ${{ github.event_name == 'pull_request_target' && steps.run-helm-docs.outcome == 'success' }}
57+
uses: divyansh-gupta/actions-comment-pull-request@675cdfe1695d33e816e060460a72feafee079d3f
58+
with:
59+
message: 'Detected changes in charts/aws-pca-issuer/values.yaml. Updated charts/aws-pca-issuer/README.md and added it as commit to this PR for review.'
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- name: Comment on pull request that the README was unable to be updated
63+
if: ${{ github.event_name == 'pull_request_target' && steps.run-helm-docs.outcome == 'failure' }}
64+
uses: divyansh-gupta/actions-comment-pull-request@675cdfe1695d33e816e060460a72feafee079d3f
65+
with:
66+
message: 'Detected changes in charts/aws-pca-issuer/values.yaml, but was unable to regenerate charts/aws-pca-issuer/README.md. Please update the pull request with README.md changes by running `make helm-docs` manually and adding the changed README.md to the commit.'
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
69+
- name: Create new PR with README changes (on manual runs)
70+
if: ${{ github.event_name == 'workflow_dispatch' && steps.run-helm-docs.outcome == 'success' }}
71+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7.0.8
72+
with:
73+
token: ${{ secrets.GITHUB_TOKEN }}
74+
commit-message: "Update Helm README.md documentation"
75+
branch: "auto-update-helm-readme"
76+
title: "Update Helm README.md documentation"
77+
body: "Automatically generated PR to update README.md based on changes in values.yaml."
78+
delete-branch: true
79+
signoff: true

.github/workflows/sync.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,4 @@ jobs:
128128
Detected different CRDs in the `config/crd/bases` directory and `charts/aws-pca-issuer/crds` directory.
129129
Since both CRDs were modified in this commit(s), they were unable to be automatically synced. Please update the pull request with identical CRDs for this workflow to pass.
130130
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131+

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ CONTROLLER_GEN_VERSION := 0.17.3
5858
CONTROLLER_GEN := ${BIN}/controller-gen-${CONTROLLER_GEN_VERSION}
5959

6060
# Helm tools
61-
HELM_TOOL_VERSION := v0.2.2
61+
HELM_TOOL_VERSION := v0.2.3
6262

6363
INSTALL_YAML ?= build/install.yaml
6464

SECURITY_CONTACTS

Lines changed: 0 additions & 11 deletions
This file was deleted.

charts/aws-pca-issuer/README.md

Lines changed: 68 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Number of replicas to run of the issuer
3333
<td>
3434

3535
```yaml
36-
1
36+
2
3737
```
3838

3939
</td>
@@ -108,6 +108,23 @@ false
108108
</tr>
109109
<tr>
110110

111+
<td>disableClientSideRateLimiting</td>
112+
<td>
113+
114+
Disables Kubernetes client-side rate limiting (only use if API Priority & Fairness is enabled on the cluster).
115+
116+
</td>
117+
<td>bool</td>
118+
<td>
119+
120+
```yaml
121+
false
122+
```
123+
124+
</td>
125+
</tr>
126+
<tr>
127+
111128
<td>imagePullSecrets</td>
112129
<td>
113130

@@ -342,26 +359,20 @@ allowPrivilegeEscalation: false
342359
<td>resources</td>
343360
<td>
344361
345-
Kubernetes pod resources requests/limits
346-
347-
For example:
362+
Kubernetes pod resources requests/limits
348363
349-
```yaml
350-
resources:
351-
limits:
352-
cpu: 100m
353-
memory: 128Mi
354-
requests:
355-
cpu: 100m
356-
memory: 128Mi
357-
```
358364
359365
</td>
360366
<td>object</td>
361367
<td>
362368
363369
```yaml
364-
{}
370+
limits:
371+
cpu: 50m
372+
memory: 64Mi
373+
requests:
374+
cpu: 50m
375+
memory: 64Mi
365376
```
366377
367378
</td>
@@ -412,7 +423,7 @@ tolerations:
412423
<td>affinity</td>
413424
<td>
414425

415-
A Kubernetes Affinity, if required; see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core
426+
A Kubernetes Affinity; see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core
416427

417428
For example:
418429

@@ -428,12 +439,23 @@ affinity:
428439
- master
429440
```
430441
442+
431443
</td>
432444
<td>object</td>
433445
<td>
434446
435447
```yaml
436-
{}
448+
podAntiAffinity:
449+
preferredDuringSchedulingIgnoredDuringExecution:
450+
- podAffinityTerm:
451+
labelSelector:
452+
matchExpressions:
453+
- key: app.kubernetes.io/name
454+
operator: In
455+
values:
456+
- aws-privateca-issuer
457+
topologyKey: kubernetes.io/hostname
458+
weight: 100
437459
```
438460
439461
</td>
@@ -443,26 +465,20 @@ affinity:
443465
<td>topologySpreadConstraints</td>
444466
<td>
445467
446-
List of Kubernetes TopologySpreadConstraints; see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#topologyspreadconstraint-v1-core
447-
448-
For example:
468+
List of Kubernetes TopologySpreadConstraints; see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#topologyspreadconstraint-v1-core
449469
450-
```yaml
451-
topologySpreadConstraints:
452-
- maxSkew: 1
453-
topologyKey: topology.kubernetes.io/zone
454-
whenUnsatisfiable: ScheduleAnyway
455-
labelSelector:
456-
matchLabels:
457-
app.kubernetes.io/name: aws-privateca-issuer
458-
```
459470
460471
</td>
461472
<td>array</td>
462473
<td>
463474
464475
```yaml
465-
[]
476+
- labelSelector:
477+
matchLabels:
478+
app.kubernetes.io/name: aws-privateca-issuer
479+
maxSkew: 1
480+
topologyKey: topology.kubernetes.io/zone
481+
whenUnsatisfiable: ScheduleAnyway
466482
```
467483
468484
</td>
@@ -472,8 +488,9 @@ topologySpreadConstraints:
472488
<td>priorityClassName</td>
473489
<td>
474490
475-
Priority class name for the issuer pods. If specified, this will set the priority class on pods, which can influence scheduling decisions.
476-
491+
Priority class name for the issuer pods
492+
If specified, this will set the priority class on pods, which can influence scheduling decisions
493+
477494
For example:
478495
479496
```yaml
@@ -561,41 +578,15 @@ Additional VolumeMounts on the operator container.
561578
</tr>
562579
<tr>
563580

564-
<td>podDisruptionBudget</td>
581+
<td>podDisruptionBudget.maxUnavailable</td>
565582
<td>
566583

567-
Configures a disruption budget for the deployment.
568-
569-
Expects input structure similar to https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#poddisruptionbudgetspec-v1-policy. WITHOUT the pod selector, which is handled by the chart. Per https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#poddisruptionbudgetspec-v1-policy, `maxUnavailable` is mutually exclusive with `minAvailable`, you cannot set both.
570-
571-
For example:
572-
573-
```yaml
574-
podDisruptionBudget:
575-
maxUnavailable: 1
576-
```
577-
578-
Or:
579-
580-
```yaml
581-
podDisruptionBudget:
582-
minAvailable: 1
583-
```
584-
585-
But NOT:
586-
587-
```yaml
588-
podDisruptionBudget:
589-
minAvailable: 1
590-
maxUnavailable: 1
591-
```
592-
593584
</td>
594-
<td>object</td>
585+
<td>number</td>
595586
<td>
596587

597588
```yaml
598-
{}
589+
1
599590
```
600591

601592
</td>
@@ -807,6 +798,23 @@ Annotations to add to the Prometheus ServiceMonitor
807798
{}
808799
```
809800

801+
</td>
802+
</tr>
803+
<tr>
804+
805+
<td>serviceMonitor.labels</td>
806+
<td>
807+
808+
Labels to add to the Prometheus ServiceMonitor
809+
810+
</td>
811+
<td>object</td>
812+
<td>
813+
814+
```yaml
815+
{}
816+
```
817+
810818
</td>
811819
</tr>
812820
</table>

charts/aws-pca-issuer/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ securityContext:
6666
allowPrivilegeEscalation: false
6767

6868
# Kubernetes pod resources requests/limits
69+
#+docs:property
6970
resources:
7071
limits:
7172
cpu: 50m
@@ -96,6 +97,7 @@ tolerations: []
9697
# operator: In
9798
# values:
9899
# - master
100+
#+docs:property
99101
affinity:
100102
podAntiAffinity:
101103
preferredDuringSchedulingIgnoredDuringExecution:
@@ -110,6 +112,7 @@ affinity:
110112
weight: 100
111113

112114
# List of Kubernetes TopologySpreadConstraints; see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#topologyspreadconstraint-v1-core
115+
#+docs:property
113116
topologySpreadConstraints:
114117
- maxSkew: 1
115118
topologyKey: topology.kubernetes.io/zone

0 commit comments

Comments
 (0)