Add ability to run qbec without kubeconfig and override qbec.yaml
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing qbec's command-line configuration and Kubernetes credential-loading paths, then compare how qbec currently reads ~/.kube/config and qbec.yaml. Define the supported flag or environment-variable inputs and their precedence before implementing the override behavior. Done means qbec can connect using supplied cluster credentials without those files, with tests covering the new inputs.
Written by the indexing model from the issue text.
Description
Right now, qbec relies on ~/.kube/config and qbec.yaml files when it tries to find cluster credentials.
I think it would be rather nice if qbec will have the ability to provide all the parameters to connect to the cluster via command line.
In my specific case, I want the ability to run qbec from Terraform.
For instance, Terraform providers have configuration like this:
resource "aws_eks_cluster" "cluster" {
name = "mycluster"
}
data "aws_eks_cluster_auth" "cluster" {
name = aws_eks_cluster.cluster.id
}
provider "kubernetes" {
host = aws_eks_cluster.main[0].endpoint
cluster_ca_certificate = base64decode(aws_eks_cluster.main[0].certificate_authority.0.data)
token = data.aws_eks_cluster_auth.cluster.token
}
And I imagine I want to run qbec from terraform with options like this:
resource "aws_eks_cluster" "cluster" {
name = "mycluster"
}
data "aws_eks_cluster_auth" "cluster" {
name = aws_eks_cluster.cluster.id
}
resource "null_resource" "cluster" {
provisioner "local-exec" {
command = <<COMMAND
qbec \
--k8s:token=${data.aws_eks_cluster_auth.cluster.token} \
--k8s:cluster-server=${aws_eks_cluster.cluster.endpoint} \
--k8s:cluster-ca-certificate=${aws_eks_cluster.cluster.certificate_authority.0.data} \
apply
COMMAND
}
}
And/or with environment variables like this:
resource "aws_eks_cluster" "cluster" {
name = "mycluster"
}
data "aws_eks_cluster_auth" "cluster" {
name = aws_eks_cluster.cluster.id
}
resource "null_resource" "cluster" {
provisioner "local-exec" {
command = "qbec apply"
environment = {
QBEC_K8S_TOKEN = data.aws_eks_cluster_auth.cluster.token
QBEC_K8S_CLUSTER_SERVER = aws_eks_cluster.cluster.endpoint
QBEC_K8S_CLUSTER_CA_CERTIFICATE = aws_eks_cluster.cluster.certificate_authority.0.data
}
}
}
Options names are discussable ofc.
- Dominant language
- Go
- Stars
- 190
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from splunk/qbec
-
Add CONTRIBUTING.md Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100