-
Story
-
Resolution: Done
-
Critical
-
None
-
None
-
3
-
False
-
None
-
False
-
-
-
-
AppSvc Sprint 237
Owner: Architect:
Francesco Ilario
Story (Required)
As a Primaza Developer,
I would like Primaza to extract data from secret's related to my deployment
so that I can extract secret data for a given service
Background (Required)
As defined in the Primaza architecture document, we need to build RegisteredService's Service Endpoint Deinition from Service specification and from linked secrets.
See epic for arch document link.
Glossary
See glossary in architecture document
Out of scope
NA
In Scope
- Secret's data extraction
Approach(Required)
Given the following service and secret:
apiVersion: stable.example.com/v1 kind: Backend metadata: name: backend namespace: services spec: fromSecret: - secretName: backend-sec secretKey: internal-host --- apiVersion: v1 kind: Secret metadata: name: backend-sec namespace: services stringData: internal-host: internal.db.stable.example.com
we want to use the following ServiceClass for extracting the internal-host from the backend's secret:
apiVersion: primaza.io/v1alpha1 kind: ServiceClass metadata: name: demo namespace: services spec: constraints: {} resource: apiVersion: stable.example.com/v1 kind: Backend serviceEndpointDefinitionMappings: secretRefFields: - name: host secretName: .spec.fromSecret[0].secretName secretKey: .spec.fromSecret[0].secretKey serviceClassIdentity: - name: type value: backend
The data extracted from secrets MUST always be stored in another secret and never in RegisteredServices' specification.
The secretName and secretKey should be defined as JSONPath.
Demo requirements(Required)
NA
Dependencies
NA
Edge Case
NA
BDD Tests
You can find BDD Test specification for this story in the "Testing Instruction" Field Tab or in the GitHub Issue linked to this story.
Click here for all BDD Tests Issues.
Acceptance Criteria
- Development
ServiceClass controller fetches data from resource related secrets
- QE
There are test cases for data fetched from resource related secrets
- Docs
There is a section in our ServiceClass docs dedicated to explaining how data is fetched from a related Secret
Update architecture document with any changes while implementing
INVEST Checklist
Dependencies identified
Blockers noted and expected delivery timelines set
Design is implementable
Acceptance criteria agreed upon
Story estimated
Legend
Unknown
Verified
Unsatisfied