generated from giantswarm/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0cd3ab
commit be634bb
Showing
9 changed files
with
174 additions
and
130 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package secret | ||
|
||
import ( | ||
"github.com/giantswarm/observability-operator/pkg/monitoring" | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
type Manager interface { | ||
GenerateGenericSecret(secretName string, secretNamespace string, key string, value string) (*corev1.Secret, error) | ||
} | ||
|
||
type SimpleManager struct { | ||
} | ||
|
||
func (m SimpleManager) GenerateGenericSecret(secretName string, secretNamespace string, key string, value string) (*corev1.Secret, error) { | ||
secret := &corev1.Secret{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: secretName, | ||
Namespace: secretNamespace, | ||
Finalizers: []string{ | ||
monitoring.MonitoringFinalizer, | ||
}, | ||
}, | ||
Data: map[string][]byte{ | ||
key: []byte(value), | ||
}, | ||
Type: "Opaque", | ||
} | ||
|
||
return secret, nil | ||
} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.