Skip to content

Commit

Permalink
Merge branch 'master' into patch-6
Browse files Browse the repository at this point in the history
Signed-off-by: SHUBHAM SHARMA  <[email protected]>
  • Loading branch information
shubhusion authored Aug 17, 2024
2 parents e8cea73 + c9bddf5 commit 479acea
Show file tree
Hide file tree
Showing 23 changed files with 373 additions and 68 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.2)
strscan
rouge (4.2.0)
safe_yaml (1.0.5)
sass-embedded (1.63.6)
Expand All @@ -84,7 +84,7 @@ GEM
tzinfo-data (1.2024.1)
tzinfo (>= 1.0.0)
unicode-display_width (2.5.0)
wdm (0.1.1)
wdm (0.2.0)
webrick (1.8.1)

PLATFORMS
Expand Down
3 changes: 2 additions & 1 deletion _data/discuss/meshery.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion _includes/extensions/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ <h4 class="pattern-name">{{extension.name}}</h4>
}

.pattern-image-container {
width: 100%;
width: 90%;
height: 50%;
position: relative;
margin: 0 auto;
}

.pattern-image {
Expand Down
1 change: 0 additions & 1 deletion _sass/brand.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
position: sticky;
top: 150px;
margin-left: 2rem;
z-index: 100; /* Ensure it's above other content */
border-radius: 5px; /* Rounded corners as per the image */
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow */
padding: 1rem; /* Padding inside the navbar */
Expand Down
1 change: 1 addition & 0 deletions _sass/features.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
width: 100%;
height: 45vh;
margin-right: 20px;
margin-top: 3rem;
-webkit-flex: 1;
flex: 1;

Expand Down
3 changes: 2 additions & 1 deletion _sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,9 @@ table {
table,
th,
td {
border: 1px solid black;
border: 1px solid var(--color-secondary-dark);
padding: 8px;
color: var(--color-secondary-dark);
}

.code {
Expand Down
1 change: 0 additions & 1 deletion _sass/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ a.nav-text:hover {
translate: 0 -5px;
background: transparent;
background-color: var(--color-primary-light);
max-height: 400px;
}

& li a {
Expand Down
1 change: 1 addition & 0 deletions assets/images/company-logo/5-no-trim.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 0.0.1
name: nginx-with-init-container-and-vhost
displayName: NGINX with init container and vhost
createdAt: "2024-03-02T07:00:15Z"
description: This design involves setting up NGINX using an init container to handle initialization tasks before the main NGINX container starts. The init container is responsible for configuration setup, such as generating or fetching configuration files. The Virtual Host (VHost) configuration allows NGINX to host multiple domains on a single server, each with its own configuration. This setup ensures a clean separation of initialization logic and main server functionality, enhancing modularity and maintainability.
logoURL: https://raw.githubusercontent.com/meshery/meshery.io/0b8585231c6e2b3251d38f749259360491c9ee6b/assets/images/brand/meshery-logo.svg
license: Apache-2.0
homeURL: https://docs.meshery.io/concepts/logical/designs
links:
- name: download
url: ../../catalog/067737d5-1c7e-4135-b879-44cb4ed07876/0.0.1/design.yml
- name: Meshery Catalog
url: https://meshery.io/catalog
readme: "1. Init Container Overhead: Using an init container adds a slight delay to the startup process, as it must complete its tasks before the main NGINX container can start.\n\n2.Configuration Management: Ensure that the init container correctly manages and updates the configuration files, as any errors can prevent NGINX from starting properly.\n\n3. Security: Validate and sanitize any external inputs or configurations handled by the init container to avoid security vulnerabilities.\n\n4. Resource Allocation: Allocate sufficient resources for both the init and main containers to prevent performance bottlenecks.\n\n5. Maintenance Complexity: This setup adds an extra layer of complexity, so proper documentation and monitoring are essential for ongoing maintenance.\n\n6.Compatibility: Ensure that the version of NGINX used is compatible with the init container's setup and the desired VHost configurations. \n ##h4 Caveats and Consideration \n"
install: mesheryctl design import -f
provider:
name: e38890c8-1b66-4a72-ae40-a8ae4a64af6c
screenshots:
- title: MeshMap Snapshot
url: https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/design-assets/067737d5-1c7e-4135-b879-44cb4ed07876-light.png
- title: MeshMap Snapshot
url: https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/design-assets/067737d5-1c7e-4135-b879-44cb4ed07876-dark.png
- title: Meshery Project
url: https://raw.githubusercontent.com/meshery/meshery.io/master/assets/images/logos/meshery-gradient.png
63 changes: 63 additions & 0 deletions catalog/067737d5-1c7e-4135-b879-44cb4ed07876/0.0.1/design.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: spoon-app
spec:
selector:
matchLabels:
app: spoon-node
replicas: 1
template:
metadata:
labels:
app: spoon-node
spec:
volumes:
- name: www
containers:
- name: spooner
image: nginx
ports:
- containerPort: 80
volumeMounts:
- name: www
mountPath: /usr/share/nginx/html/
initContainers:
- name: git
image: alpine
command: [ "sh", "-c", "apk add git && sleep 5 && git clone https://github.com/octocat/Spoon-Knife /www" ]
volumeMounts:
- name: www
mountPath: /www/
---
apiVersion: v1
kind: Service
metadata:
labels:
app: spoon-cip
name: spoon-cip
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: spoon-node
type: ClusterIP

---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ingress-spoon
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: test2.lab.as73.inetsix.net
http:
paths:
- path: /
backend:
serviceName: spoon-cip
servicePort: 80
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 0.0.5
name: nginx-k8s-deployment
displayName: nginx k8s deployment
createdAt: "2024-08-13T23:14:15Z"
description: |-
The design represented by the nginx-deployment.yaml file sets up a basic web server infrastructure using Kubernetes resources.
Key Components:
Namespace (nginx-namespace):
A separate namespace called nginx-namespace is created to isolate and organize the Nginx application and its resources from other applications running in the cluster.
Deployment (nginx-deployment):
Deploys a web server using the Nginx image (nginx:latest).
Two replicas (instances) of the Nginx server are created, ensuring high availability and load distribution across multiple pods.
Each pod in the deployment runs the Nginx container and listens on port 80.
Service (nginx-service):
Exposes the Nginx application to the external network via a LoadBalancer service type.
The service forwards traffic from external clients to the Nginx pods on port 80, making the web server accessible outside the cluster.
The service ensures that traffic is balanced between the two Nginx pods.
Purpose of the Design:
This design demonstrates how to deploy a simple, scalable web server using Kubernetes. By visualizing this in Meshery, you can:
Understand the relationship between different Kubernetes resources (Namespace, Deployment, and Service).
Observe how traffic flows from external clients through the LoadBalancer to the Nginx pods.
Learn the basics of deploying and managing stateless applications in Kubernetes.
Use this as a foundation to explore more advanced Kubernetes concepts like autoscaling, rolling updates, and integration with service meshes.
In summary, this design sets up a highly available Nginx web server with external access and load balancing, making it a fundamental example of how to deploy and expose applications using Kubernetes.
logoURL: https://raw.githubusercontent.com/meshery/meshery.io/0b8585231c6e2b3251d38f749259360491c9ee6b/assets/images/brand/meshery-logo.svg
license: Apache-2.0
homeURL: https://docs.meshery.io/concepts/logical/designs
links:
- name: download
url: ../../catalog/29b94780-865c-460b-b852-cc5c31730561/0.0.5/design.yml
- name: Meshery Catalog
url: https://meshery.io/catalog
readme: "1. LoadBalancer Requirement: Needs a cloud provider or environment that supports LoadBalancer services; otherwise, external access might not work.\n2. Namespace Conflicts: Ensure the nginx-namespace is properly managed to avoid conflicts with existing resources.\n3. Resource Availability: The cluster must have enough resources to run the two Nginx replicas.\nDefault Nginx Config: Uses basic Nginx settings; not suitable for production without customization. \n ##h4 Caveats and Consideration \n"
install: mesheryctl design import -f
provider:
name: 551da661-8632-415f-b69f-ecb298b88575
screenshots:
- title: MeshMap Snapshot
url: https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/design-assets/29b94780-865c-460b-b852-cc5c31730561-light.png
- title: MeshMap Snapshot
url: https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/design-assets/29b94780-865c-460b-b852-cc5c31730561-dark.png
- title: Meshery Project
url: https://raw.githubusercontent.com/meshery/meshery.io/master/assets/images/logos/meshery-gradient.png
3 changes: 3 additions & 0 deletions catalog/29b94780-865c-460b-b852-cc5c31730561/0.0.5/design.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: nginx k8s deployment
version: 0.0.5
services: {}
Loading

0 comments on commit 479acea

Please sign in to comment.