-
Notifications
You must be signed in to change notification settings - Fork 267
Output fields consumable by pods, config maps, etc. #740
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
Comments
See: #292 |
In short, I think ACK should focus on control plane operations. A controller that integrates data plane fields into various native Kubernetes resources is interesting but primarily the purview of things like https://github.com/redhat-developer/service-binding-operator |
Issues go stale after 90d of inactivity. |
/lifecycle frozen |
Issue #, if available: aws-controllers-k8s/community#740 Description of changes: Creates a new `FieldExport` CRD as outlined [this proposal](aws-controllers-k8s/community#1183). Also creates a new reconciler that reconciles changes to `FieldExport` and changes to any ACK resource recognised by the current controller. The path for reconciling a `FieldExport`: 1. Ensure the `FieldExport` `Source` resource group matches the current controller's group 2. Mark as managed (add finalizer) 3. Describe the source object 3a. If no source object is found, stop reconciling 4. Use the [`gojq` library](https://github.com/itchyny/gojq) to parse the unstructured source object 5. Write to `ConfigMap`/`Secret` The path when any ACK resource is updated: 1. Ensure the resource has the synced condition set to true 2. List and filter all `FieldExport` types in the namespace that reference the current resource as its `Source` 3. For each matching `FieldExport` do steps 3 and 4 from the previous path The reconciler converts all primitive types into strings (ConfigMap is a string-string map, Secret is a string-byte[] map). If the jq query returns a list of results, we will only take the first result (this PR does not support exporting slices/maps). If the jq query returns a struct, we will not take any action, treating the query as a failure. The reconciler will not delete any values from the ConfigMap or Secret. If the referenced field is removed from the object, the reconciler will no-op, rather than overwriting the data with an empty string. When the `FieldExport` is deleted, the ConfigMap or Secret will also be left untouched - meaning it contains whatever was last written to it. Upon creating a `FieldExport` CR, the reconciler will initially attempt to export the field. If it fails, it will not attempt to retry. After the first sync, the reconciler will only wait until the `ResourceVersion` of the source object changes for it to trigger a new update. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem?
Although custom resources display their outputs in their own status fields, there is currently no way to consume these fields from other (native) k8s resources. Such an example would be consuming the
configurationEndpoint
field from the ElastiCacheReplicationGroup
resource into a pod's environment variable.Describe the solution you'd like
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: