Skip to content
Open
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
29 changes: 16 additions & 13 deletions kubernetes/bankapp-ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,29 @@ kind: Ingress
metadata:
name: bankapp-ingress
namespace: bankapp-namespace
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
nginx.ingress.kubernetes.io/ssl-redirect: "true" # Force HTTPS
cert-manager.io/cluster-issuer: letsencrypt-prod # Use Let's Encrypt
spec:
ingressClassName: nginx
tls:
- hosts:
- megaproject.trainwithshubham.com
secretName: bankapp-tls-secret # Cert-Manager will manage this
- megaproject.sandeeppokhrel.cloud
secretName: bankapp-tls-secret
ingressClassName: nginx
rules:
- host: megaproject.trainwithshubham.com
- host: megaproject.sandeeppokhrel.cloud
http:
paths:
- path: /
pathType: Prefix
backend:
paths:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix Indentation for the paths Key.
YAMLlint reports that line 15 is indented with 7 spaces instead of the expected 6. Adjust the indentation to conform with YAML best practices.

-       paths:
+      paths:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
paths:
paths:
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 15-15: wrong indentation: expected 6 but found 7

(indentation)

- path: /
pathType: Prefix
backend:
service:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix Indentation for the service Key Under backend.
YAMLlint indicates that line 19 has 10 spaces, whereas 11 are expected. Please increase the indent by one space to ensure correct YAML structure.

-          service:
+           service:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
service:
service:
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 19-19: wrong indentation: expected 11 but found 10

(indentation)

name: bankapp-service
port:
number: 8080
- path: /nginx
pathType: Prefix
backend:
service:
name: nginx-service
port:
number: 80
number: 8080
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove Extraneous Port Definition.
There is an extra port entry (number: 8080) in the /nginx backend block after the correct number: 80. This duplicate entry causes a syntax error. Remove the extra line as shown below:

-              number: 8080
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
number: 8080
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 30-30: syntax error: expected , but found ''

(syntax)