-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement owner reference for secrets (#43)
Signed-off-by: Ariel Septon <arielsepton@Ariels-MBP.lan> Co-authored-by: Ariel Septon <arielsepton@Ariels-MBP.lan>
- Loading branch information
1 parent
0cc8127
commit 0aa30d5
Showing
24 changed files
with
365 additions
and
124 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: http.crossplane.io/v1alpha2 | ||
kind: DisposableRequest | ||
metadata: | ||
name: obtain-jwt-token | ||
spec: | ||
deletionPolicy: Orphan | ||
forProvider: | ||
insecureSkipTLSVerify: true | ||
|
||
# Injecting data from secrets is possible, simply use the following syntax: {{ name:namespace:key }} (supported for body and headers only) | ||
headers: | ||
Authorization: | ||
- "Basic {{ basic-auth:crossplane-system:token }}" | ||
url: http://flask-api.default.svc.cluster.local/v1/login | ||
method: POST | ||
|
||
shouldLoopInfinitely: true | ||
nextReconcile: 72h # 3 days | ||
|
||
# waitTimeout: 5m | ||
|
||
# Indicates whether the reconciliation should loop indefinitely. If `rollbackRetriesLimit` is set and the request returns an error, it will stop reconciliation once the limit is reached. | ||
# shouldLoopInfinitely: true | ||
|
||
# Specifies the duration after which the next reconcile should occur. | ||
# nextReconcile: 3m | ||
|
||
# Secrets receiving patches from response data | ||
secretInjectionConfigs: | ||
- secretRef: | ||
name: obtained-token | ||
namespace: crossplane-system | ||
secretKey: token | ||
responsePath: .body.token | ||
# setOwnerReference determines if the secret should be deleted when the associated resource is deleted. | ||
# When injecting multiple keys into the same secret, ensure this field is set consistently for all keys. | ||
setOwnerReference: true | ||
providerConfigRef: | ||
name: http-conf | ||
# TODO: check if it's possible to modify the deletionPolicy to be orphan by default. |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.