Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MeshService): namespace on example #1952

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/_src/networking/meshservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ the analog of a Kubernetes `Service`.

A basic example follows to illustrate the structure:

{% policy_yaml meshservice_example %}
{% policy_yaml meshservice_example namespace=kuma-demo %}
```yaml
type: MeshService
name: redis
Expand All @@ -29,7 +29,7 @@ spec:
selector:
dataplaneTags: # tags in Dataplane object, see below
app: redis
k8s.kuma.io/namespace: redis-system # added automatically
k8s.kuma.io/namespace: kuma-demo # added automatically
ports:
- port: 6739
targetPort: 6739
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def render(context)
# remove ```yaml header and ``` footer and read each document one by one
content = content.gsub(/`{3}yaml\n/, '').gsub(/`{3}/, '')
site_data = context.registers[:site].config
mesh_namespace = site_data['mesh_namespace']
mesh_namespace = @params["namespace"] || site_data['mesh_namespace']
uni_content = ""
kube_content = ""
YAML.load_stream(content) do |yaml_data|
Expand Down
Loading