Fix hardcoded configuration
This commit is contained in:
parent
f8e101cd8c
commit
03989d24d4
1 changed files with 4 additions and 3 deletions
|
@ -114,6 +114,7 @@ class ControlPlane(models.Model):
|
||||||
@property
|
@property
|
||||||
def kubernetes_config(self):
|
def kubernetes_config(self):
|
||||||
conf = kubernetes.client.Configuration()
|
conf = kubernetes.client.Configuration()
|
||||||
|
user_name = "servala-user"
|
||||||
|
|
||||||
config_dict = {
|
config_dict = {
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
|
@ -132,8 +133,8 @@ class ControlPlane(models.Model):
|
||||||
{
|
{
|
||||||
"context": {
|
"context": {
|
||||||
"cluster": self.name,
|
"cluster": self.name,
|
||||||
"namespace": "syn-appcat", # TODO
|
"namespace": "default",
|
||||||
"user": "appcat-service-cluster", # TODO
|
"user": user_name,
|
||||||
},
|
},
|
||||||
"name": self.name,
|
"name": self.name,
|
||||||
}
|
}
|
||||||
|
@ -143,7 +144,7 @@ class ControlPlane(models.Model):
|
||||||
"preferences": {},
|
"preferences": {},
|
||||||
"users": [
|
"users": [
|
||||||
{
|
{
|
||||||
"name": "appcat-service-cluster", # TODO
|
"name": user_name,
|
||||||
"user": {"token": self.api_credentials["token"]},
|
"user": {"token": self.api_credentials["token"]},
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue