-
Notifications
You must be signed in to change notification settings - Fork 2.4k
extra changes #20
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
base: main
Are you sure you want to change the base?
extra changes #20
Changes from 22 commits
ccff86a
3301c5b
14965ad
fd3dad1
10ba482
7005106
1337614
4c0a96a
f1ce763
348cdd1
ee8b9da
fb9b8ea
3845f59
68c78da
b9a3bc7
18f511f
298d658
75c1f9c
318d930
4f27604
7b4698e
aa346fe
28d08b1
261f656
2bb87c4
6c22726
d84e75b
7e57777
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| EX:- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment // can be:- deployment, service, ingress, webhooks (kind helps in understanding what is this yaml file about) | ||
| metadata: | ||
| name: opentelemetry-demo-adservice | ||
| labels: // labels to know what it is for and which project it is for in an organisation | ||
|
|
||
| opentelemetry.io/name: opentelemetry-demo-adservice | ||
|
Comment on lines
+1
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
for file in \
"section-9/03-Understanding deployment yaml file" \
"section-9/serviceaccount yaml file"; do
kubectl apply --dry-run=client --validate=strict -f "$file"
doneRepository: iam-veeramalla/ultimate-devops-project-aws Length of output: 225 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf 'Files:\n'
git ls-files | rg -F 'section-9' || true
printf '\nRelevant file size/content snippets:\n'
for file in \
"section-9/03-Understanding deployment yaml file" \
"section-9/serviceaccount yaml file"; do
if [ -f "$file" ]; then
printf '\n== %s (%d lines) ==\n' "$file" "$(wc -l < "$file")"
sed -n '1,220p' "$file" | cat -n
else
printf 'missing: %s\n' "$file"
fi
done
printf '\nYAML parser check (if available):\n'
python3 - <<'PY' || true
try:
import yaml
except Exception as e:
print(f"PyYAML unavailable/import error: {type(e).__name__}: {e}")
raise SystemExit
import pathlib, sys
for path in [pathlib.Path("section-9/03-Understanding deployment yaml file"), pathlib.Path("section-9/serviceaccount yaml file")]:
print(f"\n== {path} ==")
all_errors = []
try:
docs = list(yaml.safe_load_all(path.read_text()))
print(f"loaded {len(docs)} document(s)")
for i, doc in enumerate(docs, 1):
print(f"doc {i}: {type(doc).__name__}={doc!r}")
except Exception as e:
print(f"load_all error: {type(e).__name__}: {e}")
PYRepository: iam-veeramalla/ultimate-devops-project-aws Length of output: 7509 🌐 Web query:
💡 Result: Yes, Kubernetes uses the standard YAML format, which supports comments using the octothorpe/hash symbol (#) [1][2][3]. The double-slash (//) syntax, commonly used in languages like C, Java, or JavaScript, is not a valid comment syntax in YAML and will result in a parsing error if used [1]. Key points regarding comments in Kubernetes YAML: - Symbol: Only the # symbol is used to denote comments [1][2]. - Scope: Comments are single-line only; there is no native multi-line comment syntax in YAML [1]. To comment out multiple lines, you must prefix each line with a # symbol [1]. - Placement: Comments can be placed on their own line or at the end of a line (inline) [1]. They are ignored by the Kubernetes API server and have no effect on the processed configuration [4][2]. - Constraints: Comments cannot be placed inside strings or block scalar values (like multiline strings), as the parser will treat the # symbol as part of the data itself [1][2]. - Separators: Kubernetes supports the use of document separators (---). While historically some parsers encountered issues when comments immediately followed these separators, recent versions of Kubernetes handle whitespace and comments after separators correctly [5][6]. Because Kubernetes manifests rely on standard YAML parsers, they strictly follow the YAML specification, which does not recognize // for commenting [7][2][3]. Citations:
Keep instructional prose and non-YAML comments out of manifest files.
📍 Affects 2 files
🤖 Prompt for AI AgentsSource: MCP tools |
||
| app.kubernetes.io/instance: opentelemetry-demo | ||
| app.kubernetes.io/component: adservice | ||
| app.kubernetes.io/name: opentelemetry-demo-adservice | ||
| app.kubernetes.io/version: "1.12.0" | ||
| app.kubernetes.io/part-of: opentelemetry-demo | ||
| spec: | ||
| replicas: 1 | ||
| revisionHistoryLimit: 10 | ||
| selector: | ||
| matchLabels: | ||
|
|
||
| opentelemetry.io/name: opentelemetry-demo-adservice | ||
| template: | ||
| metadata: | ||
| labels: | ||
|
|
||
| opentelemetry.io/name: opentelemetry-demo-adservice | ||
| app.kubernetes.io/instance: opentelemetry-demo | ||
| app.kubernetes.io/component: adservice | ||
| app.kubernetes.io/name: opentelemetry-demo-adservice | ||
| spec: | ||
| serviceAccountName: opentelemetry-demo | ||
| containers: | ||
| - name: adservice | ||
| image: 'ghcr.io/open-telemetry/demo:1.12.0-adservice' | ||
| imagePullPolicy: IfNotPresent | ||
| ports: | ||
|
|
||
| - containerPort: 8080 | ||
| name: service | ||
| env: //usually given by developer | ||
| - name: OTEL_SERVICE_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| apiVersion: v1 | ||
| fieldPath: metadata.labels['app.kubernetes.io/component'] | ||
| - name: OTEL_COLLECTOR_NAME | ||
| value: 'opentelemetry-demo-otelcol' | ||
| - name: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE | ||
| value: cumulative | ||
| - name: AD_SERVICE_PORT | ||
| value: "8080" | ||
| - name: FLAGD_HOST | ||
| value: 'opentelemetry-demo-flagd' | ||
| - name: FLAGD_PORT | ||
| value: "8013" | ||
| - name: OTEL_EXPORTER_OTLP_ENDPOINT | ||
| value: http://$(OTEL_COLLECTOR_NAME):4318 | ||
| - name: OTEL_LOGS_EXPORTER | ||
| value: otlp | ||
| - name: OTEL_RESOURCE_ATTRIBUTES | ||
| value: service.name=$(OTEL_SERVICE_NAME),service.namespace=opentelemetry-demo,service.version=1.12.0 | ||
| resources: | ||
| limits: | ||
| memory: 300Mi | ||
| volumeMounts: | ||
| volumes: | ||
|
|
||
| ........................................................................................................................................................ | ||
| apiversion, kind help in identifying what kind of resource it is | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| EX:- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: opentelemetry-demo-cartservice | ||
| labels: | ||
|
|
||
| opentelemetry.io/name: opentelemetry-demo-cartservice | ||
| app.kubernetes.io/instance: opentelemetry-demo | ||
| app.kubernetes.io/component: cartservice | ||
| app.kubernetes.io/name: opentelemetry-demo-cartservice | ||
| app.kubernetes.io/version: "1.12.0" | ||
| app.kubernetes.io/part-of: opentelemetry-demo | ||
| spec: | ||
| type: ClusterIP | ||
| ports: | ||
| - port: 8080 | ||
| name: tcp-service | ||
| targetPort: 8080 //target port meets the container port in the deplo yaml file (containerPort: 8080) | ||
| selector: | ||
| opentelemetry.io/name: opentelemetry-demo-cartservice | ||
|
|
||
| ........................................................................................................... | ||
| we know a service identifies a pod using labels but how will service know? | ||
| -> Selector: | ||
| -> we specify the label inside this that we have in our pod, pod resource or in our deployment template ( template: | ||
| metadata: | ||
| labels: | ||
| opentelemetry.io/name: opentelemetry-demo-cartservice | ||
| app.kubernetes.io/instance: opentelemetry-demo | ||
| app.kubernetes.io/component: cartservice | ||
| app.kubernetes.io/name: opentelemetry-demo-cartservice) | ||
| ) | ||
|
Comment on lines
+1
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Separate prose from copyable YAML and use Both files embed prose or
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: iam-veeramalla/ultimate-devops-project-aws
Length of output: 3197
Use an EC2 IAM role instead of prompting for long-lived keys.
Since this section is inside EC2, skip the
aws configureaccess/secret key input and runaws eks ... update-kubeconfigwith an IAM role/instance profile that has the required EKS permissions. This keeps credentials on the instance metadata as temporary credentials instead of storing long-lived access keys.🤖 Prompt for AI Agents
Source: MCP tools