[keystone-k8s] remove configurability of admin-.../server-tenant options

These options creates more issues than they are solving. Removing
`admin-user`, `admin-role`, and `service-tenant` to ensure a standard
sunbeam deployment.

Rename the `Admin` to the default [1]` admin` role.

1: https://docs.openstack.org/keystone/2024.1/admin/service-api-protection.html
Change-Id: I93f3b754e4aca2cc71b0e408555c6d937a9d4e04
This commit is contained in:
Guillaume Boutry 2024-06-06 11:14:01 +02:00
parent 5b902a232a
commit bf43f5cf8d
29 changed files with 8 additions and 70 deletions

View File

@ -37,8 +37,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -30,8 +30,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: false
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -37,8 +37,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -37,8 +37,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -36,8 +36,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -29,8 +29,7 @@ applications:
channel: 2024.1/edge
scale: 1
trust: false
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -37,8 +37,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -29,8 +29,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -36,8 +36,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -11,19 +11,6 @@ options:
type: string
description: Log level (WARNING, INFO, DEBUG, ERROR)
admin-user:
default: admin
description: Default admin user for keystone
type: string
admin-role:
default: Admin
description: Admin role to be associated with admin and service users
type: string
service-tenant:
default: services
description: Name of tenant to associate with service credentials
type: string
region:
default: RegionOne
description: Name of the OpenStack region

View File

@ -1169,7 +1169,7 @@ export OS_AUTH_VERSION=3
name="admin", domain=admin_domain.get("name")
)
admin_user = self.keystone_manager.ksclient.show_user(
name=self.model.config["admin-user"],
name=self.admin_user,
domain=admin_domain.get("name"),
project=admin_project.get("name"),
project_domain=admin_domain.get("name"),
@ -1350,12 +1350,12 @@ export OS_AUTH_VERSION=3
@property
def admin_user(self):
"""Admin User."""
return self.model.config["admin-user"]
return "admin"
@property
def admin_role(self):
"""Admin role."""
return self.model.config["admin-role"]
return "admin"
@property
def charm_user(self):
@ -1381,7 +1381,7 @@ export OS_AUTH_VERSION=3
@property
def service_project(self):
"""Service project name."""
return self.model.config["service-tenant"]
return "services"
@property
def service_project_id(self):

View File

@ -28,8 +28,6 @@ applications:
charm: ../../keystone-k8s.charm
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -203,7 +203,7 @@ class TestKeystoneOperatorCharm(test_utils.CharmTestCase):
"admin-domain-name": "adomain_name",
"admin-project-id": "aproject_id",
"admin-project-name": "aproject_name",
"admin-role": "Admin",
"admin-role": "admin",
"admin-user-id": "auser_id",
"admin-user-name": "auser_name",
"api-version": "v3",

View File

@ -29,8 +29,6 @@ applications:
series: jammy
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -30,8 +30,7 @@ applications:
channel: 2024.1/edge
scale: 1
trust: false
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -30,8 +30,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -37,8 +37,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -30,8 +30,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -21,8 +21,7 @@ applications:
channel: 2024.1/edge
scale: 1
trust: false
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -28,8 +28,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -30,8 +30,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -35,8 +35,6 @@ applications:
channel: 2024.1/edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -27,8 +27,6 @@ applications:
channel: edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -28,8 +28,6 @@ applications:
channel: edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -62,8 +62,6 @@ applications:
base: ubuntu@22.04
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -34,8 +34,6 @@ applications:
base: ubuntu@22.04
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -67,8 +67,6 @@ applications:
base: ubuntu@22.04
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -39,8 +39,6 @@ applications:
base: ubuntu@22.04
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M

View File

@ -67,8 +67,6 @@ applications:
base: ubuntu@22.04
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M