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
|
||||
def kubernetes_config(self):
|
||||
conf = kubernetes.client.Configuration()
|
||||
user_name = "servala-user"
|
||||
|
||||
config_dict = {
|
||||
"apiVersion": "v1",
|
||||
|
@ -132,8 +133,8 @@ class ControlPlane(models.Model):
|
|||
{
|
||||
"context": {
|
||||
"cluster": self.name,
|
||||
"namespace": "syn-appcat", # TODO
|
||||
"user": "appcat-service-cluster", # TODO
|
||||
"namespace": "default",
|
||||
"user": user_name,
|
||||
},
|
||||
"name": self.name,
|
||||
}
|
||||
|
@ -143,7 +144,7 @@ class ControlPlane(models.Model):
|
|||
"preferences": {},
|
||||
"users": [
|
||||
{
|
||||
"name": "appcat-service-cluster", # TODO
|
||||
"name": user_name,
|
||||
"user": {"token": self.api_credentials["token"]},
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue