outposts: make outpost managed
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
1005f341e4
commit
1554dc9feb
|
@ -77,6 +77,7 @@ class OutpostSerializer(ModelSerializer):
|
||||||
"service_connection_obj",
|
"service_connection_obj",
|
||||||
"token_identifier",
|
"token_identifier",
|
||||||
"config",
|
"config",
|
||||||
|
"managed",
|
||||||
]
|
]
|
||||||
extra_kwargs = {"type": {"required": True}}
|
extra_kwargs = {"type": {"required": True}}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.2.4 on 2021-06-23 19:25
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('authentik_outposts', '0016_alter_outpost_type'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='outpost',
|
||||||
|
name='managed',
|
||||||
|
field=models.TextField(default=None, help_text='Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.', null=True, unique=True, verbose_name='Managed by authentik'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -34,6 +34,7 @@ from authentik.lib.config import CONFIG
|
||||||
from authentik.lib.models import InheritanceForeignKey
|
from authentik.lib.models import InheritanceForeignKey
|
||||||
from authentik.lib.sentry import SentryIgnoredException
|
from authentik.lib.sentry import SentryIgnoredException
|
||||||
from authentik.lib.utils.http import USER_ATTRIBUTE_CAN_OVERRIDE_IP
|
from authentik.lib.utils.http import USER_ATTRIBUTE_CAN_OVERRIDE_IP
|
||||||
|
from authentik.managed.models import ManagedModel
|
||||||
from authentik.outposts.controllers.k8s.utils import get_namespace
|
from authentik.outposts.controllers.k8s.utils import get_namespace
|
||||||
from authentik.outposts.docker_tls import DockerInlineTLS
|
from authentik.outposts.docker_tls import DockerInlineTLS
|
||||||
|
|
||||||
|
@ -281,7 +282,7 @@ class KubernetesServiceConnection(OutpostServiceConnection):
|
||||||
verbose_name_plural = _("Kubernetes Service-Connections")
|
verbose_name_plural = _("Kubernetes Service-Connections")
|
||||||
|
|
||||||
|
|
||||||
class Outpost(models.Model):
|
class Outpost(ManagedModel):
|
||||||
"""Outpost instance which manages a service user and token"""
|
"""Outpost instance which manages a service user and token"""
|
||||||
|
|
||||||
uuid = models.UUIDField(default=uuid4, editable=False, primary_key=True)
|
uuid = models.UUIDField(default=uuid4, editable=False, primary_key=True)
|
||||||
|
|
24
schema.yml
24
schema.yml
|
@ -21217,6 +21217,14 @@ components:
|
||||||
config:
|
config:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: {}
|
additionalProperties: {}
|
||||||
|
managed:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
title: Managed by authentik
|
||||||
|
description: Objects which are managed by authentik. These objects are created
|
||||||
|
and updated automatically. This is flag only indicates that an object
|
||||||
|
can be overwritten by migrations. You can still modify the objects via
|
||||||
|
the API, but expect changes to be overwritten in a later update.
|
||||||
required:
|
required:
|
||||||
- config
|
- config
|
||||||
- name
|
- name
|
||||||
|
@ -21279,6 +21287,14 @@ components:
|
||||||
config:
|
config:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: {}
|
additionalProperties: {}
|
||||||
|
managed:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
title: Managed by authentik
|
||||||
|
description: Objects which are managed by authentik. These objects are created
|
||||||
|
and updated automatically. This is flag only indicates that an object
|
||||||
|
can be overwritten by migrations. You can still modify the objects via
|
||||||
|
the API, but expect changes to be overwritten in a later update.
|
||||||
required:
|
required:
|
||||||
- config
|
- config
|
||||||
- name
|
- name
|
||||||
|
@ -24953,6 +24969,14 @@ components:
|
||||||
config:
|
config:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: {}
|
additionalProperties: {}
|
||||||
|
managed:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
title: Managed by authentik
|
||||||
|
description: Objects which are managed by authentik. These objects are created
|
||||||
|
and updated automatically. This is flag only indicates that an object
|
||||||
|
can be overwritten by migrations. You can still modify the objects via
|
||||||
|
the API, but expect changes to be overwritten in a later update.
|
||||||
PatchedPasswordExpiryPolicyRequest:
|
PatchedPasswordExpiryPolicyRequest:
|
||||||
type: object
|
type: object
|
||||||
description: Password Expiry Policy Serializer
|
description: Password Expiry Policy Serializer
|
||||||
|
|
Reference in New Issue