getporter/kubernetes-plugins
Fork: 7 Star: 3 (更新于 2024-11-09 00:06:11)
license: Apache-2.0
Language: Go .
Kubernetes plug in for Porter, enables management of credentials as Kubernetes secrets
最后发布版本: v1.0.3 ( 2023-04-14 05:22:48)
Kubernetes Plugins for Porter
This is a set of Kubernetes plugins for Porter.
The plugin enables Porter to use Kubernetes secrets as source for CredentialSets.
Installation
The plugin is distributed as a single binary, kubernetes
. The following snippet will clone this repository, build the binary
and install it to ~/.porter/plugins/.
go get get.porter.sh/plugin/azure/cmd/kubernetes-plugins
cd $(go env GOPATH)/src/get.porter.sh/plugin/kubernetes-plugins
make build install
Usage
After installation, you must modify your porter configuration file. The plugin supports secret values (secrets).
The plugin can be used when porter is running inside a Kubernetes cluster - in which case it will connect automatically, it can also be used from outside a cluster in which case it will either use the kubeconfig file sourced from the KUBECONFIG
environment variable or $HOME/.kube/config
if this is not set.
When running outside a cluster the plugin requires configuration to specify which namespace it should store data in, when running inside a cluster it will use the namespace of the pod that porter is running in.
The plugin also requires that the user or service account that is being used with Kubernetes has "get","list","create","delete",
and "patch"
permissions on secrets in the namespace.
The Porter Operator is the primary use case
for running in Kubernetes which configures the necessary service accounts via
it's configureNamespace
custom action.
porter invoke porterops --action configureNamespace --param namespace=quickstart -c porterops
Secrets
The kubernetes.secrets
plugin enables resolution of credential or parameter values and storing sensitive data(parameter or output values) as secrets in Kubernetes via the Porter Operator.
-
Create,
./porter-k8s-config.yaml
-
Add the following lines1:
default-secrets: "kubernetes-secrets" secrets: - name: "kubernetes-secrets" plugin: "kubernetes.secrets"
-
Provide the Porter config to the
configureNamespace
operator bundle actionporter invoke operator --action=configureNamespace --param namespace=<namespace name> --param porterConfig=porter-k8s-config.toml -c kind -n=operator
-
If the plugin is being used outside of a Kubernetes cluster then add the following lines to specify the namespace to be used to store data:
default-secrets: "kubernetes-secrets" secrets: - name: "kubernetes-secrets" plugin: "kubernetes.secrets" config: namespace: "<namespace name>"
In both cases the Kubernetes secret must be created with a credential
key
kubectl --namespace "<namespace name>" create secret generic password --from-literal=credential=test
Porter credentials file test-credentials.yaml
---
schemaType: CredentialSet
schemaVersion: 1.0.1
namespace: ''
name: kubernetes-plugin-test
credentials:
- name: test-cred
source:
secret: password
porter credentials apply test-credentials.yaml
最近版本更新:(数据更新于 2024-09-27 17:14:36)
2023-04-14 05:22:48 v1.0.3
2023-02-25 02:16:30 v1.0.2
2022-10-21 05:04:28 v1.0.1
2022-10-12 00:17:47 v1.0.0
2022-09-09 05:00:24 v1.0.0-rc.1
2022-05-27 23:26:13 v1.0.0-beta.3
2022-05-27 21:18:21 v1.0.0-beta.2
2022-05-25 01:19:16 v1.0.0-beta.1
2022-05-19 04:24:11 v0.2.2
2022-04-22 06:53:20 v0.2.1
主题(topics):
kubernetes, plugins, porter
getporter/kubernetes-plugins同语言 Go最近更新仓库
2024-11-21 22:49:20 containerd/containerd
2024-11-21 13:50:50 XTLS/Xray-core
2024-11-21 06:27:30 ollama/ollama
2024-11-21 05:17:55 Melkeydev/go-blueprint
2024-11-21 04:04:03 dolthub/dolt
2024-11-21 01:52:15 SpecterOps/BloodHound