-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(endpoints): migrate all regions #9943
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -38,12 +38,15 @@ spec: | |||||||||||||||||||||||||
| labels: | ||||||||||||||||||||||||||
| app: esp-echo | ||||||||||||||||||||||||||
| spec: | ||||||||||||||||||||||||||
| # [START endpoints_secret_1_java] | ||||||||||||||||||||||||||
|
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. For better readability and maintainability, consider adding a comment explaining the purpose of this volume and secret. While the
Suggested change
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. The addition of # Start Java secret configuration
Suggested change
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. Add a comment explaining the purpose of this section. For example, "Define volumes for mounting service account credentials." This improves readability and understanding of the YAML structure.
Suggested change
|
||||||||||||||||||||||||||
| # [START secret-1] | ||||||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||||||
| - name: service-account-creds | ||||||||||||||||||||||||||
| secret: | ||||||||||||||||||||||||||
| secretName: service-account-creds | ||||||||||||||||||||||||||
| # [END secret-1] | ||||||||||||||||||||||||||
| # [END endpoints_secret_1_java] | ||||||||||||||||||||||||||
|
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. Similar to the previous comment, consider making this comment more descriptive. For example:
Suggested change
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. Similar to the previous comment, add a concise explanation for # Start Java service configuration
Suggested change
|
||||||||||||||||||||||||||
| # [START endpoints_service_java] | ||||||||||||||||||||||||||
OremGLG marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| # [START service] | ||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||
| - name: esp | ||||||||||||||||||||||||||
|
|
@@ -56,14 +59,17 @@ spec: | |||||||||||||||||||||||||
| "--service_account_key", "/etc/nginx/creds/service-account-creds.json", | ||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||
| # [END service] | ||||||||||||||||||||||||||
| # [END endpoints_service_java] | ||||||||||||||||||||||||||
|
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. |
||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||
| - containerPort: 8080 | ||||||||||||||||||||||||||
| # [START endpoints_secret_2_java] | ||||||||||||||||||||||||||
|
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. Could you clarify the purpose of this section in the comment? For instance,
Suggested change
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. 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. Add a concise comment explaining the # Start Java secret configuration (part 2)
Suggested change
OremGLG marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| # [START secret-2] | ||||||||||||||||||||||||||
| volumeMounts: | ||||||||||||||||||||||||||
| - mountPath: /etc/nginx/creds | ||||||||||||||||||||||||||
| name: service-account-creds | ||||||||||||||||||||||||||
| readOnly: true | ||||||||||||||||||||||||||
| # [END secret-2] | ||||||||||||||||||||||||||
| # [END endpoints_secret_2_java] | ||||||||||||||||||||||||||
|
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. |
||||||||||||||||||||||||||
| - name: echo | ||||||||||||||||||||||||||
| image: gcr.io/endpoints-release/echo:latest | ||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
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.
The comment
# [START endpoints_secret_1_java]could be more descriptive. Instead of just indicating the start of a section, explain the purpose of this section, e.g.,# [START endpoints_secret_1_java] Define the service account credentials volume. This improves readability and maintainability by providing context. This recommendation is based on general comment formatting best practices, which emphasize clarity and explaining the why behind the code.