Conversation
This reverts commit 4b03f28.
CasLubbers
left a comment
There was a problem hiding this comment.
Also really good improvmenets in here. I didn't saw any changes for the settings. Is that correct? I don't know from the top of my mind if we can change any secret values in the settings.
| } | ||
|
|
||
| export async function encryptSecretValue(pem: string, namespace: string, value: string): Promise<string> { | ||
| const { encryptSecretItem } = await import('@linode/kubeseal-encrypt') |
There was a problem hiding this comment.
Does this import need to be in the function?
| this.sessionId = sessionId ?? 'main' | ||
| } | ||
|
|
||
| private static sealedSecretToUserData(manifest: SealedSecretManifestResponse): UserSecretData { |
There was a problem hiding this comment.
Static functions should mostly be avoided. In this case its better to move this function outside of this class even this file because otomi-stack is already quite big
| } as UserSecretData | ||
| } | ||
|
|
||
| private async listUserSecretData(): Promise<UserSecretData[]> { |
There was a problem hiding this comment.
In the future we could also opt for reading the users directly from the k8s cluster. Then we can remove this code outside of the otomi-stack
| const { metadata } = data | ||
|
|
||
| // Server-side encryption fallback: if any encryptedData values are plain text, encrypt them | ||
| if (data.spec.encryptedData && Object.keys(data.spec.encryptedData).length > 0) { |
There was a problem hiding this comment.
How does this check if the values are in plain text? Now it checks the length is that correct?
| const username = (otomi?.git?.username ?? '') as string | ||
| const password = (otomi?.git?.password ?? '') as string | ||
| const { cluster } = this.getSettings(['cluster']) | ||
| const username = env.GIT_USER |
There was a problem hiding this comment.
I don't think I saw that we pass down the git user through the enviroment variables. We should adjust apl-core
📌 Summary
PRs: apl-core | apl-tasks