[Misc] Use CAP Operator getDependency endpoint in the chart & minor updates#100
Draft
anirudhprasad-sap wants to merge 6 commits into
Draft
[Misc] Use CAP Operator getDependency endpoint in the chart & minor updates#100anirudhprasad-sap wants to merge 6 commits into
anirudhprasad-sap wants to merge 6 commits into
Conversation
…ration - Introduced SubscriptionDependencyMode with values Auto, Always, and Never. - Updated serviceInstanceExt to include SubscriptionDependency. - Modified schema generation to reflect changes in FieldsV1, Duration, Time, and IntOrString definitions. - Changed JSON marshaling to use indentation for better readability. - Ensured that generated schema files include a newline at the end. refactor(util): enhance prompt validation in ask function - Updated the ask function to support custom validators alongside mandatory checks. - Simplified the validation logic for user input. test: add validation test for runtime-values generation - Implemented a test case to ensure invalid app names raise appropriate errors during runtime-values generation. - Updated expected runtime-values YAML files to reflect new callback URLs. chore: clean up unnecessary annotations in templates - Removed commented-out annotations related to x-forwarded-client-cert from CAPApplication templates.
Contributor
There was a problem hiding this comment.
The PR makes several good changes: updating dependency endpoints to use the CAP Operator's centralized routes, adding startupProbe and subscriptionDependency schema fields, fixing schema types for Duration/Time/IntOrString/FieldsV1, and adding input validation for the app name prompt. Two issues were found: (1) the custom validator in lib/util.js is invoked even for empty optional fields, which could surface misleading format errors on fields the user intentionally left blank; and (2) the app name format validation is skipped entirely for service-only charts even though the app name is still used in domain/URL construction where the same character constraints apply.
PR Bot Information
Version: 1.20.43
- LLM:
anthropic--claude-4.6-sonnet - Correlation ID:
3e886b12-1f13-4a3a-b4ce-2d3e72d382c8 - Event Trigger:
pull_request.opened - File Content Strategy: Full file content
…lDomainRefs parameters Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use CAP Operator
getDependencyEndpoint in Chart & Minor UpdatesMisc
🔧 This PR updates the Helm chart to use the CAP Operator's native
getDependencyendpoint for dependency callbacks, replacing previously app-specific URLs. It also includes schema improvements, input validation enhancements, and dependency upgrades.Changes
files/runtime-values.yaml.hbs: UpdatedgetDependenciesURL for both XSUAA (saasRegistry) and IAS (subscriptionManager) flows to use the CAP Operator endpoint format (https://{{capOperatorSubdomain}}.{{clusterDomain}}/dependencies/...), removing the app/provider subdomain-based URLs.lib/util.js: Extended theask()prompt utility to support a customvalidatorfunction parameter alongside the existing mandatory check. RefactoredwriteCAPApplicationCROto remove the IAS-specificsme.sap.com/vs-route-request-header-setannotation, applying a unified annotation block for all cases.bin/cap-op-plugin.js: Added anappNameValidatorfor non-service-only charts that enforces lowercase alphanumeric and hyphen characters (a-z,0-9,-) for the app name prompt.hack/schema-generation.go: Added aSubscriptionDependencyModetype withAuto/Always/Neverenum values. ExtendedserviceInstanceExtwith asubscriptionDependencyfield. Fixed schema post-processing forFieldsV1,Duration,Time, andIntOrStringtypes. Switched JSON marshaling to indented format and appended trailing newlines to output files.files/chart/values.schema.json&files/configurableTemplatesChart/values.schema.json: AddedsubscriptionDependencyenum field to service instance schema. AddedenableCleanupMonitoringboolean toappschema. FixedDuration,Time,FieldsV1, andIntOrStringtype definitions. AddedstartupProbereference to workload schema.hack/go.mod/hack/go.sum: Bumped Go to1.26.3, updatedcap-operatortov0.29.1,sap-btp-service-operatortov0.10.7,invopop/jsonschematov0.14.0, and various indirect dependencies includingk8s.io/*tov0.36.0andcontroller-runtimetov0.24.0.test/cap-op-plugin.test.js: Added a new test case validating that an invalid app name (containing uppercase letters) triggers the validation error'Only a-z, 0-9 and - are allowed'.test/files/expectedChart/*&test/files/expectedConfigurableTemplatesChart/*: Updated expected runtime values and CRO templates to reflect the new CAP Operator dependency URLs and removal of the IAS-specific annotation.PR Bot Information
Version:
1.20.433e886b12-1f13-4a3a-b4ce-2d3e72d382c8anthropic--claude-4.6-sonnetpull_request.opened