Skip to content

Commit fa67790

Browse files
authored
Merge branch 'main' into feat/amazon-eks-grafana-stack
2 parents 1983b7b + 9bd0d6a commit fa67790

File tree

10 files changed

+112
-50
lines changed

10 files changed

+112
-50
lines changed

.github/renovate-pr.json5

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,69 @@
11
{
2+
/**
3+
* Renovate Configuration
4+
*
5+
* This configuration file defines how Renovate handles dependency updates for repositories.
6+
* Renovate is a bot that automatically creates pull requests to update dependencies.
7+
*
8+
* Documentation: https://docs.renovatebot.com/configuration-options/
9+
*/
210
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3-
branchPrefix: "renovate-pr/",
11+
12+
// # keep-sorted start block=yes
13+
branchPrefix: "chore/renovate-pr/",
414
customDatasources: {
515
"grafana-dashboards": {
616
defaultRegistryUrlTemplate: "https://grafana.com/api/dashboards/{{packageName}}",
717
format: "json",
818
transformTemplates: ['{"releases":[{"version": $string(revision)}]}'],
919
},
1020
},
11-
customManagers: [
21+
// Keep the extends started with ":" at the end of the list to allow overriding
22+
extends: [
23+
"config:recommended", // Renovate's recommended configuration preset
24+
"docker:pinDigests", // Pin Docker image digests for security
25+
"helpers:pinGitHubActionDigestsToSemver", // Pin GitHub Actions to specific versions with semantic versioning
26+
"security:openssf-scorecard", // Add OpenSSF Scorecard security insights
27+
":disableDependencyDashboard", // Don't create dependency dashboard issues
28+
":disableRateLimiting", // Disable rate limiting for faster updates
29+
":docker", // Enable Docker container updates
30+
":enableVulnerabilityAlertsWithLabel(security)", // Add security label to vulnerability alerts
31+
":pinSkipCi", // Pin dependencies and skip CI for pin-only updates
32+
],
33+
packageRules: [
1234
{
13-
customType: "regex",
35+
automerge: true,
36+
commitBody: "[skip ci]",
37+
description: "Automerge all without running any tests",
38+
ignoreTests: true,
39+
matchPackagePatterns: ["*"],
40+
},
41+
],
42+
prCommitsPerRunLimit: 500,
43+
prConcurrentLimit: 500,
44+
prHourlyLimit: 500,
45+
// This allows Renovate to detect and update dependencies that aren't in standard package files
46+
regexManagers: [
47+
{
48+
// Template for extracting version numbers from custom patterns
1449
extractVersionTemplate: "{{#if extractVersion}}{{{extractVersion}}}{{else}}^v?(?<version>.+)${{/if}}",
50+
51+
// File types to scan for custom dependency patterns
1552
fileMatch: ["\\.ya?ml$", "\\.md$", "^Dockerfile$", "^entrypoint\\.sh$"],
53+
54+
// Regex pattern to match custom dependency declarations
55+
// Format: # renovate: datasource=<source> depName=<name> [versioning=<type>] [extractVersion=<regex>] [registryUrl=<url>]
56+
// Example: # renovate: datasource=github-releases depName=helm/helm versioning=semver
1657
matchStrings: [
1758
'# renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)( versioning=(?<versioning>.+?))?( extractVersion=(?<extractVersion>.+?))?( registryUrl=(?<registryUrl>.+?))?\\s.*[=:]\\s*"?(?<currentValue>.+?)"?\\s',
1859
],
60+
61+
// Default to semantic versioning unless specified otherwise
1962
versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}",
2063
},
2164
{
22-
customType: "regex",
2365
datasourceTemplate: "custom.grafana-dashboards",
66+
customType: "regex",
2467
fileMatch: ["\\.md$"],
2568
matchStrings: [
2669
'# renovate: depName="(?<depName>.*)"\\n\\s+gnetId:\\s+(?<packageName>.*?)\\n\\s+revision:\\s+(?<currentValue>.*)',
@@ -38,29 +81,5 @@
3881
],
3982
},
4083
],
41-
// Keep the extends started with ":" at the end of the list to allow overriding
42-
extends: [
43-
"config:recommended",
44-
"docker:pinDigests",
45-
"helpers:pinGitHubActionDigestsToSemver",
46-
"security:openssf-scorecard",
47-
":disableDependencyDashboard",
48-
":disableRateLimiting",
49-
":docker",
50-
":enableVulnerabilityAlertsWithLabel(security)",
51-
":pinSkipCi",
52-
],
53-
packageRules: [
54-
{
55-
automerge: true,
56-
commitBody: "[skip ci]",
57-
description: "Automerge all without running any tests",
58-
ignoreTests: true,
59-
matchPackagePatterns: ["*"],
60-
},
61-
],
62-
prConcurrentLimit: 500,
63-
prHourlyLimit: 500,
64-
prCommitsPerRunLimit: 500,
65-
branchConcurrentLimit: 500,
84+
// # keep-sorted end
6685
}

.github/renovate.json5

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,56 @@
11
{
2+
/**
3+
* Renovate Configuration
4+
*
5+
* This configuration file defines how Renovate handles dependency updates for repositories.
6+
* Renovate is a bot that automatically creates pull requests to update dependencies.
7+
*
8+
* Documentation: https://docs.renovatebot.com/configuration-options/
9+
*/
210
$schema: "https://docs.renovatebot.com/renovate-schema.json",
11+
312
// # keep-sorted start block=yes
13+
"git-submodules": {
14+
enabled: true,
15+
},
16+
automerge: true,
17+
automergeType: "branch",
18+
branchPrefix: "chore/renovate/",
419
customDatasources: {
520
"grafana-dashboards": {
621
defaultRegistryUrlTemplate: "https://grafana.com/api/dashboards/{{packageName}}",
722
format: "json",
823
transformTemplates: ['{"releases":[{"version": $string(revision)}]}'],
924
},
1025
},
26+
// Base Configuration Presets
1127
// Keep the extends started with ":" at the end of the list to allow overriding
1228
extends: [
13-
"config:recommended",
14-
"docker:pinDigests",
15-
"helpers:pinGitHubActionDigestsToSemver",
16-
"security:openssf-scorecard",
17-
":disableDependencyDashboard",
18-
":disableRateLimiting",
19-
":docker",
20-
":enableVulnerabilityAlertsWithLabel(security)",
21-
":pinSkipCi",
29+
"config:recommended", // Renovate's recommended configuration preset
30+
"docker:pinDigests", // Pin Docker image digests for security
31+
"helpers:pinGitHubActionDigestsToSemver", // Pin GitHub Actions to specific versions with semantic versioning
32+
"security:openssf-scorecard", // Add OpenSSF Scorecard security insights
33+
":disableDependencyDashboard", // Don't create dependency dashboard issues
34+
":disableRateLimiting", // Disable rate limiting for faster updates
35+
":docker", // Enable Docker container updates
36+
":enableVulnerabilityAlertsWithLabel(security)", // Add security label to vulnerability alerts
37+
":pinSkipCi", // Pin dependencies and skip CI for pin-only updates
2238
],
2339
// ignore chirpy dependencies
2440
// https://renovatebot.com/docs/configuration-options/#ignoredeps
2541
ignorePaths: ["_posts/**"],
42+
// Pull Request Labeling
2643
labels: [
2744
"renovate",
2845
"renovate/{{replace '.*/' '' depName}}",
2946
"renovate/{{updateType}}",
3047
],
48+
// Lock File Maintenance
49+
lockFileMaintenance: {
50+
enabled: true,
51+
schedule: ["before 6am on Sunday"],
52+
},
53+
// Package-specific Update Rules
3154
packageRules: [
3255
{
3356
description: "Disable auto-merge for major updates",
@@ -65,16 +88,23 @@
6588
],
6689
prBodyTemplate: "{{{table}}}{{{notes}}}{{{changelogs}}}",
6790
rebaseWhen: "behind-base-branch",
68-
// Custom version extraction
91+
// This allows Renovate to detect and update dependencies that aren't in standard package files
6992
regexManagers: [
7093
{
71-
description: "Regular expressions inside md, YAML, Dockerfile or entrypoint.sh looking for '# renovate:' comments",
72-
customType: "regex",
94+
// Template for extracting version numbers from custom patterns
7395
extractVersionTemplate: "{{#if extractVersion}}{{{extractVersion}}}{{else}}^v?(?<version>.+)${{/if}}",
96+
97+
// File types to scan for custom dependency patterns
7498
fileMatch: ["\\.ya?ml$", "\\.md$", "^Dockerfile$", "^entrypoint\\.sh$"],
99+
100+
// Regex pattern to match custom dependency declarations
101+
// Format: # renovate: datasource=<source> depName=<name> [versioning=<type>] [extractVersion=<regex>] [registryUrl=<url>]
102+
// Example: # renovate: datasource=github-releases depName=helm/helm versioning=semver
75103
matchStrings: [
76104
'# renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)( versioning=(?<versioning>.+?))?( extractVersion=(?<extractVersion>.+?))?( registryUrl=(?<registryUrl>.+?))?\\s.*[=:]\\s*"?(?<currentValue>.+?)"?\\s',
77105
],
106+
107+
// Default to semantic versioning unless specified otherwise
78108
versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}",
79109
},
80110
{

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
26+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2727

2828
- name: Initialize CodeQL
2929
# Does not support arm64

.github/workflows/commit-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
commit-check:
1717
runs-on: ubuntu-24.04-arm
1818
steps:
19-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
19+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2020
with:
2121
fetch-depth: 0
2222

.github/workflows/pr-slack-notification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
if: ${{ startsWith(github.event.pull_request.html_url, 'https') || startsWith(github.event.issue.pull_request.html_url, 'https') }}
5959
steps:
6060
- name: Checkout repository
61-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
61+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6262

6363
- name: Retrieve Slack message timestamp from cache
6464
id: slack-timestamp

.github/workflows/renovate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
group: ${{ github.workflow }}-${{ github.ref }}
4949
permissions: write-all
5050
steps:
51-
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
51+
- uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
5252
id: app-token
5353
with:
5454
app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }}

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
28+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2929
with:
3030
# Disable credential persistence for security
3131
persist-credentials: false

AGENTS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and maintainability across all contributions.
2121
- [Example](#example)
2222
- [Branching](#branching)
2323
- [Pull Requests](#pull-requests)
24+
- [EKS Cluster Access](#eks-cluster-access)
2425
- [Quality \& Best Practices](#quality--best-practices)
2526

2627
## Markdown Files
@@ -97,6 +98,19 @@ Resolves: #123
9798
- **Description** - Include clear explanation of changes and motivation
9899
- **Link issues** - Reference related issues using keywords (Fixes, Closes, Resolves)
99100

101+
## EKS Cluster Access
102+
103+
When accessing the Kubernetes cluster, execute the following command **once**
104+
at the beginning of the session:
105+
106+
```bash
107+
eval "$(mise run a)"
108+
```
109+
110+
This command sets up the necessary environment variables and configuration
111+
for Kubernetes cluster access. It should be run only once per session before
112+
any Kubernetes-related operations.
113+
100114
## Quality & Best Practices
101115

102116
- Pass pre-commit hooks

_posts/2023/2023-06-06-my-favourite-krew-plugins-kubectl.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Links:
1717

1818
- [Suman Chakraborty's Post](https://www.linkedin.com/posts/schakraborty007_opensource-kubernetes-k8s-activity-7038698712470089728-ADeV)
1919
- [Top 15 Kubectl plugins for security engineers](https://sysdig.com/blog/top-15-kubectl-plugins-for-security-engineers)
20-
- [Kubernetes: Krew plugins manager, and useful kubectl plugins list](https://devpress.csdn.net/cicd/62ec6d5c89d9027116a10eb0.html)
2120
- [Making Kubernetes Operations Easy with kubectl Plugins](https://martinheinz.dev/blog/58)
2221

2322
## Requirements

_posts/2025/2025-02-01-eks-auto-cert-manager-velero.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,14 @@ and modify its [default values](https://github.com/vmware-tanzu/helm-charts/blob
321321

322322
```bash
323323
# renovate: datasource=helm depName=velero registryUrl=https://vmware-tanzu.github.io/helm-charts
324-
VELERO_HELM_CHART_VERSION="8.3.0"
324+
VELERO_HELM_CHART_VERSION="11.1.1"
325325

326326
helm repo add --force-update vmware-tanzu https://vmware-tanzu.github.io/helm-charts
327327
cat > "${TMP_DIR}/${CLUSTER_FQDN}/helm_values-velero.yml" << EOF
328328
initContainers:
329329
- name: velero-plugin-for-aws
330330
# renovate: datasource=docker depName=velero/velero-plugin-for-aws extractVersion=^(?<version>.+)$
331-
image: velero/velero-plugin-for-aws:v1.11.1
331+
image: velero/velero-plugin-for-aws:v1.13.0
332332
volumeMounts:
333333
- mountPath: /target
334334
name: plugins
@@ -881,7 +881,7 @@ Back up the certificate before deleting the cluster (in case it was renewed):
881881
{% raw %}
882882

883883
```sh
884-
if [[ "$(kubectl get --raw /api/v1/namespaces/cert-manager/services/cert-manager:9402/proxy/metrics | awk '/certmanager_http_acme_client_request_count.*acme-v02\.api.*finalize/ { print $2 }')" -gt 0 ]]; then
884+
if [[ "$(kubectl get --raw /api/v1/namespaces/cert-manager/services/cert-manager:9402/proxy/metrics | awk '/certmanager_http_acme_client_request_count.*acme-v02\.api.*finalize/ { print $2 }')" -gt 0 ]] && [[ -n "$(velero get backups -o json | jq -e --arg today "$(date +%Y-%m-%d)" '.items[] | select(.status.startTimestamp | startswith($today))')" ]]; then
885885
velero backup create --labels letsencrypt=production --ttl 2160h --from-schedule velero-monthly-backup-cert-manager-production
886886
fi
887887
```

0 commit comments

Comments
 (0)