Skip to content

Commit a7912d2

Browse files
Merge branch 'sort-resources-feature' of https://github.com/akshatsinghai6682-sketch/layer5 into sort-resources-feature
2 parents 08eb7aa + 25d90e8 commit a7912d2

21 files changed

Lines changed: 640 additions & 263 deletions

File tree

‎.github/workflows/build-site-preview.yaml‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,27 @@ defaults:
1919
jobs:
2020
build:
2121
runs-on: ubuntu-24.04
22-
if: github.event.action != 'closed'
23-
2422
steps:
2523
- name: Harden Runner
2624
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
2725
with:
2826
egress-policy: audit
2927

3028
- name: Checkout PR
29+
if: github.event.action != 'closed'
3130
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3231
with:
3332
persist-credentials: false
3433

3534
- name: Setup Node
35+
if: github.event.action != 'closed'
3636
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3737
with:
3838
node-version: "22"
3939
cache: 'npm'
4040

4141
- name: Gatsby Cache
42+
if: github.event.action != 'closed'
4243
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
4344
with:
4445
path: |
@@ -48,9 +49,15 @@ jobs:
4849
${{ runner.os }}-gatsby-${{ github.event.pull_request.number }}-
4950
5051
- name: Install dependencies
52+
if: github.event.action != 'closed'
5153
run: npm ci
5254

55+
- name: Unit tests
56+
if: github.event.action != 'closed'
57+
run: npm run test:unit
58+
5359
- name: Build PR preview
60+
if: github.event.action != 'closed'
5461
env:
5562
GATSBY_PREVIEW: "true"
5663
GATSBY_SITE_URL: https://${{ github.repository_owner }}.github.io

‎.github/workflows/checks.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
- name: Check CONTRIBUTING versions
2222
run: npm run check:contributing-versions
2323

24+
- name: Unit tests
25+
run: npm run test:unit
26+
2427
- name: Build
2528
run: npm run build
2629

‎.github/workflows/deploy-site-preview.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
actions: read
1212

1313
concurrency:
14-
group: preview-post-build-${{ github.event.workflow_run.head_branch }}
14+
group: preview-post-build-${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}
1515
cancel-in-progress: false
1616

1717
env:
@@ -118,7 +118,7 @@ jobs:
118118
# emitted a usable close event.
119119
needs: manage-preview
120120
runs-on: ubuntu-24.04
121-
if: needs.manage-preview.outputs.action != 'closed'
121+
if: ${{ !cancelled() && needs.manage-preview.outputs.action != 'closed' }}
122122
outputs:
123123
removed_prs: ${{ steps.prune-previews.outputs.removed_prs }}
124124
removed_prs_json: ${{ steps.prune-previews.outputs.removed_prs_json }}

‎CONTRIBUTING.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ If you'd like to contribute a post to layer5.io/blog, please open an Issue and s
127127

128128
# Contributing to Layer5 Sistent
129129

130-
If you'd like to contribute to [Sistent](https://github.com/layer5io/sistent), a UI/UX design system, start by selecting the [project/sistent](https://github.com/layer5io/layer5/labels/project%2Fsistent)label in this repo at https://github.com/layer5io/layer5/labels/project%2Fsistent or by visiting the project repo at hhttps://github.com/layer5io/sistent.
130+
If you'd like to contribute to [Sistent](https://github.com/layer5io/sistent), a UI/UX design system, start by selecting the [project/sistent](https://github.com/layer5io/layer5/labels/project%2Fsistent) label in this repo at https://github.com/layer5io/layer5/labels/project%2Fsistent or by visiting the project repo at https://github.com/layer5io/sistent.
131131

132132
### General Contribution Guidelines
133133

@@ -527,8 +527,9 @@ Environment variables are named values used to configure how an application beha
527527
| Variable | Possible Values | Description |
528528
| --------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
529529
| `BUILD_FULL_SITE` | `true`, `false` | When set to `true`, enables a full site build including all collections. If not explicitly set to `true`, the project defaults to a lightweight build. |
530-
| `LITE_BUILD_PROFILE` | `content`, `core` | Selects which collections are excluded when `BUILD_FULL_SITE=false`. `core` is the default for `make site`, `npm start`, and `npm run dev`, while `content` keeps blog, news, events, and resources enabled. |
530+
| `LITE_BUILD_PROFILE` | `core`, `content`, `blog` | Selects which collections are excluded when `BUILD_FULL_SITE=false`. `core` is the default for `make site`, `npm start`, and `npm run dev` and skips blog, news, events, and resources. `content` keeps blog, news, events, and resources enabled. `blog` keeps the blog and skips news, events, and resources; `make site-blog` uses it. |
531531
| `BUILD_COLLECTIONS_EXCLUDE` | comma-separated collection names | Adds extra collections to exclude from a lightweight build without editing project files. |
532+
| `BLOG_YEAR` | comma-separated four-digit years | Limits a lightweight build that includes the blog (`content` or `blog` profile) to posts under `src/collections/blog/<year>`, e.g. `BLOG_YEAR=2026` or `BLOG_YEAR=2025,2026`. Posts from other years are not built and return 404. `make site-blog` defaults it to the latest year. A year with no directory, or a value that is not a year, fails the build. Ignored, with a warning, for full builds and for profiles that exclude the blog. |
532533
| `NODE_ENV` | `development`, `production` | Determines the build and rendering mode used by Gatsby. This is automatically set by Gatsby. <br><br>• `development` - Uses **Deferred Static Generation (DSG)** i.e pages built on demand for faster startup. <br>• `production` - Uses **Server-Side Rendering (SSR)** i.e pages rendered on each request for fresh content. |
533534
| `CI` | `true`, `false` | Indicates that the build is running in a **Continuous Integration (CI)** environment (e.g., GitHub Actions). When set to `true`, special logic is applied to page paths and redirects for GitHub Pages compatibility. This is typically set automatically by the CI system and does not need to be configured manually. |
534535

@@ -588,7 +589,7 @@ make setup
588589
make site
589590
```
590591

591-
This will run a local webserver with "live reload" conveniently enabled.
592+
This will run a local webserver with "live reload" conveniently enabled. `make site` skips the blog, news, events, and resources collections to keep builds fast. To work on a blog post, run `make site-blog`, which builds only the latest year's blog posts; choose other years with `BLOG_YEAR=2025,2026 make site-blog`. Run `make` to list every target.
592593

593594
`make site` starts a **lightweight** dev server: it skips the heaviest content
594595
collections (members, integrations, blog, news, events, resources) so that the

‎Makefile‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ site:
2525
@echo " Use LITE_BUILD_PROFILE=content make site to include content collections while still skipping the heaviest routes."
2626
@npx cross-env BUILD_FULL_SITE=false LITE_BUILD_PROFILE=$(or $(LITE_BUILD_PROFILE),core) BLOG_YEAR=$(or $(BLOG_YEAR),) env-cmd -f .env.development node scripts/run-gatsby.js develop
2727

28-
## Run blog-only dev server (2026 posts only, much faster builds).
28+
# Latest year directory under src/collections/blog, e.g. 2026.
29+
LATEST_BLOG_YEAR := $(shell ls src/collections/blog | grep -E '^[0-9]{4}$$' | sort | tail -n 1)
30+
31+
## Run blog-only dev server scoped to the latest blog year (override: BLOG_YEAR=2025,2026).
2932
site-blog:
30-
@echo "🏗️ Building lightweight site version with blog collection only..."
31-
LITE_BUILD_PROFILE=blog BLOG_YEAR=2026 $(MAKE) site
33+
@echo "🏗️ Building lightweight site version with blog posts from $(or $(BLOG_YEAR),$(LATEST_BLOG_YEAR)) only..."
34+
LITE_BUILD_PROFILE=blog BLOG_YEAR=$(or $(BLOG_YEAR),$(LATEST_BLOG_YEAR)) $(MAKE) site
3235

3336
# "make site-full" forces the dev server to include every collection.
3437
## Run a full build of layer5.io on your local machine.

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ alt="Nighthawk" align="left" />
6363

6464
<p style="clear:both;">
6565
<h2><a href="https://cloud.layer5.io/catalog">Cloud Native Catalog</a></h2>
66-
<a href="">
66+
<a href="https://cloud.layer5.io/catalog">
6767
<img src=".github/assets/images/catalog/catalog.svg"
6868
style="float:left;margin:10px;" width="125px"
6969
alt="Meshery Catalog" align="left" />
7070
</a>
71-
<a href="">Layer5 Catalog</a> As a central hub for sharing cloud native infrastructure designs, Meshery Catalog enables the exchange of the best practices, reusable templates, and Kubernetes-based operational patterns for multi-cluster Kubernetes clusters and distributed applications. Meshery Catalog serves as a marketplace full of curated cloud native infrastructure configurations and operational patterns perfect for DevOps engineers who seek to leverage and contribute to Meshery's large collection of design patterns. [Docs](https://docs.layer5.io/cloud/catalog)
71+
<a href="https://cloud.layer5.io/catalog">Layer5 Catalog</a> As a central hub for sharing cloud native infrastructure designs, Meshery Catalog enables the exchange of the best practices, reusable templates, and Kubernetes-based operational patterns for multi-cluster Kubernetes clusters and distributed applications. Meshery Catalog serves as a marketplace full of curated cloud native infrastructure configurations and operational patterns perfect for DevOps engineers who seek to leverage and contribute to Meshery's large collection of design patterns. [Docs](https://docs.layer5.io/cloud/catalog)
7272
<br /><br /><br />
7373
</p>
7474

‎gatsby-config.js‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const {
44
DEFAULT_LITE_BUILD_PROFILE,
5+
getBlogYearFilter,
56
getExcludedCollections,
67
isFullSiteBuild,
78
} = require("./src/utils/build-collections");
@@ -26,9 +27,14 @@ const isLiteDevBuild = isDevelopment && !shouldBuildFullSite;
2627
const excludedCollections = getExcludedCollections({
2728
isFullSiteBuild: shouldBuildFullSite,
2829
});
29-
const collectionIgnoreGlobs = excludedCollections.map(
30-
(name) => `**/${name}/**`,
31-
);
30+
const blogYearFilter = getBlogYearFilter({
31+
isFullSiteBuild: shouldBuildFullSite,
32+
excludedCollections,
33+
});
34+
const collectionIgnoreGlobs = [
35+
...excludedCollections.map((name) => `**/${name}/**`),
36+
...blogYearFilter.ignoreGlobs,
37+
];
3238
const devFlags = isDevelopment
3339
? {
3440
PARALLEL_SOURCING: false,
@@ -41,6 +47,15 @@ collectionIgnoreGlobs.length > 0
4147
`Build Scope excludes (${process.env.LITE_BUILD_PROFILE || DEFAULT_LITE_BUILD_PROFILE}): ${excludedCollections.join(", ")}`,
4248
)
4349
: console.info("Build Scope includes all collections");
50+
if (blogYearFilter.years.length > 0) {
51+
console.info(
52+
`Build Scope blog years (BLOG_YEAR): ${blogYearFilter.years.join(", ")}`,
53+
);
54+
} else if (blogYearFilter.inactiveReason) {
55+
console.warn(
56+
`BLOG_YEAR=${process.env.BLOG_YEAR} ignored: ${blogYearFilter.inactiveReason}`,
57+
);
58+
}
4459
module.exports = {
4560
...(pathPrefix != null ? { pathPrefix } : {}),
4661
siteMetadata: {

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"lint": "eslint --fix .",
2929
"checklint": "eslint .",
3030
"check:contributing-versions": "node .github/scripts/check-contributing-versions.cjs",
31+
"test:unit": "node --test src/utils/build-collections.test.js",
3132
"pretest": "eslint --ignore-path .gitignore .",
3233
"deploy": "gatsby build && gh-pages -d public -b master",
3334
"noIndex": "gatsby build && echo 'User-agent: *\nDisallow: /' > public/robots.txt",

‎src/collections/blog/2022/2022-05-27-debug-envoy-proxy/index.mdx‎

Lines changed: 19 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -52,97 +52,49 @@ The default is <span className="highlight">info</span>.
5252
<h3>Setting Envoy logs in the Helm configuration</h3>
5353

5454
The Consul helm chart uses <code>envoyExtraArgs:</code> to leverage Envoy command line options. One of the helpful options is <code>--component-log-level</code>. This provides granular control over setting log levels for Envoy components. In the example below, the components upstream, http, router and config are set to the debug log level. These four components are vital when debugging issues with requests between your services(sidecar proxies).
55-
<div>
56-
<pre>
57-
<code>connectInject:
55+
<Code language="yaml" codeString={`connectInject:
5856
enabled: true
59-
envoyExtraArgs: "--component-log-level upstream:debug,http:debug,router:debug,config:debug"</code>
60-
</pre>
61-
</div>
57+
envoyExtraArgs: "--component-log-level upstream:debug,http:debug,router:debug,config:debug"`} />
6258

6359
If you haven't set envoyExtraArgs: in consul-values.yaml just yet, you can set the log levels on the fly by using the following kubectl command:
64-
<div>
65-
<pre>
66-
<code>$ kubectl exec pod/pod-name -c container-name -- curl -X POST http://localhost:19000/logging?config=debug</code>
67-
</pre>
68-
</div>
60+
<Code language="bash" codeString={`kubectl exec pod/pod-name -c container-name -- curl -X POST http://localhost:19000/logging?config=debug`} />
6961

7062
Example:
71-
<div>
72-
<pre>
73-
<code>$ kubectl exec pod/static-client-5bf4575d9c-zr2b -c static-client -- curl -X POST http://localhost:19000/logging?config=debug</code>
74-
</pre>
75-
</div>
63+
<Code language="bash" codeString={`kubectl exec pod/static-client-5bf4575d9c-zr2b -c static-client -- curl -X POST http://localhost:19000/logging?config=debug`} />
7664

77-
You will execute the kubectl command for each component. Make sure to append the correct component at the end of the curl command, i.e. <code>logging? component = debug</code>.
65+
You will execute the kubectl command for each component. Make sure to append the correct component at the end of the curl command, i.e. <code>logging?&lt;component&gt;=debug</code>.
7866
If curl is not able to be used in your pod, you can alternatively use <code>kubectl port-forward pod-name 19000</code> to make the Envoy admin accessible. From another terminal window, you can then curl to change the log levels. The output you receive in the terminal will show the modified component log levels.
79-
<div>
80-
<pre>
81-
<code>$ curl -X POST http://localhost:19000/logging? component = debug</code>
82-
</pre>
83-
</div>
67+
<Code language="bash" codeString={`curl -X POST http://localhost:19000/logging?upstream=debug`} />
8468
<h3>Access Envoy logs in Kubernetes</h3>
8569

8670
Accessing Envoy logs via pods can be done with the following command:
87-
<div>
88-
<pre>
89-
<code>$ kubectl logs --follow pod/ pod-name -c envoy-sidecar</code>
90-
</pre>
91-
</div>
71+
<Code language="bash" codeString={`kubectl logs --follow pod/pod-name -c envoy-sidecar`} />
9272

9373
The --follow flag provides a real time observation into Envoy logs.
9474
<h3>Setting and Accessing Envoy logs when not using Helm.</h3>
9575

9676
The following command will start an envoy side car proxy, set the log level to debug with -l debug and capture Envoy logs in envoy_logs.txt. The .txt file will need to be created before executing this command.
97-
<div>
98-
<pre>
99-
<code>$ consul connect envoy -sidecar-for counting-1 -- -l debug --log-path envoy_logs.txt</code>
100-
</pre>
101-
</div>
77+
<Code language="bash" codeString={`consul connect envoy -sidecar-for counting-1 -- -l debug --log-path envoy_logs.txt`} />
10278

10379
To have granular control over the Envoy components that is needed to be debugged, use the following command:
104-
<div>
105-
<pre>
106-
<code>$ consul connect envoy -sidecar-for counting-1 -- --log-path envoy_logs.txt --component-log-level upstream:debug,http:debug,router:debug,config:debug</code>
107-
</pre>
108-
</div>
80+
<Code language="bash" codeString={`consul connect envoy -sidecar-for counting-1 -- --log-path envoy_logs.txt --component-log-level upstream:debug,http:debug,router:debug,config:debug`} />
10981

11082
<h2>Find your Istio Ingress Gateway</h2>
11183
With Istio as your gateway, you should first look at <code>VirtualService</code> objects. These can show if the hosts are registered to the gateway correctly.
112-
<div>
113-
<pre>
114-
<code>$ kubectl get virtualservice -o=yaml</code>
115-
</pre>
116-
</div>
84+
<Code language="bash" codeString={`kubectl get virtualservice -o=yaml`} />
11785

11886
However, sometimes, the <a className="highlight" href="https://envoyproxy.io">Envoy</a> inside the gateway container is not properly configured (likely due to a bug). You can dump Envoy configuration to debug this further.
119-
<div>
120-
<pre>
121-
<code># find istio ingress gateway pod \
122-
$ kubectl get pods -n istio-system -l app=istio-ingressgateway</code>
123-
</pre>
124-
</div>
87+
<Code language="bash" codeString={`# find istio ingress gateway pod
88+
kubectl get pods -n istio-system -l app=istio-ingressgateway`} />
12589

12690
Let's use <code>istio-ingressgateway-a93019f9dfw-l39xd</code> as an example pod name.
127-
<div>
128-
<pre>
129-
<code>
130-
# enable debugging on envoy \
131-
$ kubectl exec --namespace=istio-system \
132-
istio-ingressgateway-a93019f9dfw-l39xd \
133-
-c istio-proxy -- curl -X POST \
134-
http://localhost:15000/logging?level=debug
135-
</code>
136-
</pre>
137-
</div>
91+
<Code language="bash" codeString={`# enable debugging on envoy
92+
kubectl exec --namespace=istio-system \\
93+
istio-ingressgateway-a93019f9dfw-l39xd \\
94+
-c istio-proxy -- curl -X POST \\
95+
http://localhost:15000/logging?level=debug`} />
13896
Then, use <code>istioctl</code> tool to dump route configuration (this will show the output from the <a href="https://www.envoyproxy.io/docs/envoy/latest/operations/admin#operations-admin-interface-config-dump"><code>/config_dump</code> admin endpoint</a> on Envoy):
139-
<div>
140-
<pre>
141-
<code>
142-
$ istioctl proxy-config routes -n istio-system -o=json \
143-
istio-ingressgateway-a93019f9dfw-l39xd
144-
</code>
145-
</pre>
146-
</div>
97+
<Code language="bash" codeString={`istioctl proxy-config routes -n istio-system -o=json \\
98+
istio-ingressgateway-a93019f9dfw-l39xd`} />
14799
We hope these steps are useful to you. If you're still having trouble configuring Envoy proxy, open up a new thread on the <a href="https://discuss.meshery.io" className="highlight">community discussion forum</a> or subscribe to the <Link to="/subscribe" className="highlight">Layer5 newletter</Link> for tips and tricks.
148100
</BlogWrapper>

‎src/collections/programs/Programs.style.js‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,20 @@ export const ProgramsWrapper = styled.div`
8686
.gsod-table-container {
8787
overflow-x: auto;
8888
}
89-
.mlh_logo {
89+
90+
.mlh_logo.mlh_logo--dark {
91+
display: none;
92+
}
93+
94+
[data-theme="dark"] & .mlh_logo--light {
95+
display: none;
96+
}
97+
98+
[data-theme="dark"] & .mlh_logo--dark {
99+
display: inline-block;
100+
}
101+
102+
.mlh_logo {
90103
width: 19vw;
91104
float: right;
92105
margin-left: 40px;

0 commit comments

Comments
 (0)