mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(secrets): allow creating secrets beyond opaque [EE-2625] (#7709)
This commit is contained in:
parent
3b2f0ff9eb
commit
4e20d70a99
23 changed files with 659 additions and 135 deletions
|
@ -1,4 +1,4 @@
|
|||
import { KubernetesConfigurationTypes } from './models';
|
||||
import { KubernetesConfigurationKinds, KubernetesSecretTypes } from './models';
|
||||
|
||||
/**
|
||||
* KubernetesConfigurationFormValues Model
|
||||
|
@ -8,15 +8,17 @@ const _KubernetesConfigurationFormValues = Object.freeze({
|
|||
ResourcePool: '',
|
||||
Name: '',
|
||||
ConfigurationOwner: '',
|
||||
Type: KubernetesConfigurationTypes.CONFIGMAP,
|
||||
Kind: KubernetesConfigurationKinds.CONFIGMAP,
|
||||
Data: [],
|
||||
DataYaml: '',
|
||||
IsSimple: true,
|
||||
ServiceAccountName: '',
|
||||
Type: KubernetesSecretTypes.OPAQUE,
|
||||
});
|
||||
|
||||
export class KubernetesConfigurationFormValues {
|
||||
constructor() {
|
||||
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesConfigurationFormValues)));
|
||||
Object.assign(this, _KubernetesConfigurationFormValues);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ export const KubernetesPortainerConfigurationDataAnnotation = 'io.portainer.kube
|
|||
const _KubernetesConfiguration = Object.freeze({
|
||||
Id: 0,
|
||||
Name: '',
|
||||
Type: '',
|
||||
Kind: '',
|
||||
Namespace: '',
|
||||
CreationDate: '',
|
||||
ConfigurationOwner: '',
|
||||
|
@ -23,7 +23,19 @@ export class KubernetesConfiguration {
|
|||
}
|
||||
}
|
||||
|
||||
export const KubernetesConfigurationTypes = Object.freeze({
|
||||
export const KubernetesConfigurationKinds = Object.freeze({
|
||||
CONFIGMAP: 1,
|
||||
SECRET: 2,
|
||||
});
|
||||
|
||||
export const KubernetesSecretTypes = Object.freeze({
|
||||
OPAQUE: { name: 'Opaque', value: 'Opaque' },
|
||||
SERVICEACCOUNTTOKEN: { name: 'Service account token', value: 'kubernetes.io/service-account-token' },
|
||||
DOCKERCFG: { name: 'Dockercfg', value: 'kubernetes.io/dockercfg' },
|
||||
DOCKERCONFIGJSON: { name: 'Dockerconfigjson', value: 'kubernetes.io/dockerconfigjson' },
|
||||
BASICAUTH: { name: 'Basic auth', value: 'kubernetes.io/basic-auth' },
|
||||
SSHAUTH: { name: 'SSH auth', value: 'kubernetes.io/ssh-auth' },
|
||||
TLS: { name: 'TLS', value: 'kubernetes.io/tls' },
|
||||
BOOTSTRAPTOKEN: { name: 'Bootstrap token', value: 'bootstrap.kubernetes.io/token' },
|
||||
CUSTOM: { name: 'Custom', value: 'Custom' },
|
||||
});
|
||||
|
|
|
@ -5,11 +5,13 @@ const _KubernetesApplicationSecret = Object.freeze({
|
|||
Id: 0,
|
||||
Name: '',
|
||||
Namespace: '',
|
||||
Type: '',
|
||||
CreationDate: '',
|
||||
ConfigurationOwner: '',
|
||||
Yaml: '',
|
||||
Data: [],
|
||||
SecretType: '',
|
||||
Annotations: [],
|
||||
});
|
||||
|
||||
export class KubernetesApplicationSecret {
|
||||
|
|
|
@ -5,7 +5,7 @@ import { KubernetesCommonMetadataPayload } from 'Kubernetes/models/common/payloa
|
|||
*/
|
||||
const _KubernetesSecretCreatePayload = Object.freeze({
|
||||
metadata: new KubernetesCommonMetadataPayload(),
|
||||
type: 'Opaque',
|
||||
type: '',
|
||||
data: {},
|
||||
stringData: {},
|
||||
});
|
||||
|
@ -21,7 +21,7 @@ export class KubernetesSecretCreatePayload {
|
|||
*/
|
||||
const _KubernetesSecretUpdatePayload = Object.freeze({
|
||||
metadata: new KubernetesCommonMetadataPayload(),
|
||||
type: 'Opaque',
|
||||
type: '',
|
||||
data: {},
|
||||
stringData: {},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue