-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add generic cloud creds secret logic
- Loading branch information
Showing
5 changed files
with
169 additions
and
33 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
31 changes: 31 additions & 0 deletions
31
pkg/asset/manifests/content/tectonic/libvirt-creds-secret-and-reader-role.go
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,31 @@ | ||
package tectonic | ||
|
||
import ( | ||
"text/template" | ||
) | ||
|
||
var ( | ||
// LibvirtCredsSecretAndReaderRole is the constant to represent contents of libvirt-creds-secret.yaml file | ||
LibvirtCredsSecretAndReaderRole = template.Must(template.New("libvirt-creds-secret-and-reader-role.yaml").Parse(` | ||
--- | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
namespace: kube-system | ||
name: cloud-creds-secret | ||
data: | ||
something: {{.CloudCreds.LibvirtCredsData.Base64encodeLibvirtSomething}} | ||
somethingelse: {{.CloudCreds.LibvirtCredsData.Base64encodeLibvirtSomethingElse}} | ||
--- | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
namespace: kube-system | ||
name: cloud-creds-secret-reader | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
resourceNames: ["cloud-creds-secret"] | ||
verbs: ["get"] | ||
`)) | ||
) |
31 changes: 31 additions & 0 deletions
31
pkg/asset/manifests/content/tectonic/openstack-creds-secret-and-reader-role.go
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,31 @@ | ||
package tectonic | ||
|
||
import ( | ||
"text/template" | ||
) | ||
|
||
var ( | ||
// OpenStackCredsSecretAndReaderRole is the constant to represent contents of openstack-creds-secret.yaml file | ||
OpenStackCredsSecretAndReaderRole = template.Must(template.New("openstack-creds-secret-and-reader-role.yaml").Parse(` | ||
--- | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
namespace: kube-system | ||
name: cloud-creds-secret | ||
data: | ||
something: {{.CloudCreds.OpenStackCredsData.Base64encodeOpenStackSomething}} | ||
somethingelse: {{.CloudCreds.OpenStackCredsData.Base64encodeOpenStackSomethingElse}} | ||
--- | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
namespace: kube-system | ||
name: cloud-creds-secret-reader | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
resourceNames: ["cloud-creds-secret"] | ||
verbs: ["get"] | ||
`)) | ||
) |
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