2022-09-05 03:06:08 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-08-29 08:30:20 -04:00
|
|
|
package kubernetes
|
2022-03-25 05:42:27 -04:00
|
|
|
|
|
|
|
import (
|
|
|
|
k8s "k8s.io/api/core/v1"
|
|
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
|
|
)
|
|
|
|
|
2022-07-08 04:59:59 -04:00
|
|
|
// Secrets represent a list of k8s Secret.
|
2022-03-25 05:42:27 -04:00
|
|
|
type Secrets []*k8s.Secret
|
|
|
|
|
|
|
|
// Marshal marshals secrets into multiple YAML documents.
|
|
|
|
func (s Secrets) Marshal() ([]byte, error) {
|
|
|
|
objects := make([]runtime.Object, len(s))
|
|
|
|
for i := range s {
|
|
|
|
objects[i] = s[i]
|
|
|
|
}
|
|
|
|
return MarshalK8SResourcesList(objects)
|
|
|
|
}
|