KanidmSpec

Struct KanidmSpec 

Source
pub struct KanidmSpec {
Show 27 fields pub domain: String, pub replica_groups: Vec<ReplicaGroup>, pub external_replication_nodes: Vec<ExternalReplicationNode>, pub image: String, pub log_level: KanidmLogLevel, pub port_name: String, pub image_pull_policy: Option<String>, pub env: Option<Vec<EnvVar>>, pub oauth2_client_namespace_selector: Option<LabelSelector>, pub group_namespace_selector: Option<LabelSelector>, pub person_namespace_selector: Option<LabelSelector>, pub storage: Option<KanidmStorage>, pub ldap_port_name: Option<String>, pub tls_secret_name: Option<String>, pub service: Option<KanidmService>, pub ingress: Option<KanidmIngress>, pub volumes: Option<Vec<Volume>>, pub volume_mounts: Option<Vec<VolumeMount>>, pub persistent_volume_claim_retention_policy: Option<StatefulSetPersistentVolumeClaimRetentionPolicy>, pub security_context: Option<PodSecurityContext>, pub dns_policy: Option<String>, pub dns_config: Option<PodDNSConfig>, pub containers: Option<Vec<Container>>, pub init_containers: Option<Vec<Container>>, pub min_ready_seconds: Option<i32>, pub host_aliases: Option<Vec<HostAlias>>, pub host_network: Option<bool>,
}
Expand description

Specification of the desired behavior of the Kanidm cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Fields§

§domain: String

The DNS domain name of the server. This is used in a number of security-critical contexts such as webauthn, so it must match your DNS hostname. It is used to create security principal names such as william@idm.example.com so that in a (future) trust configuration it is possible to have unique Security Principal Names (spns) throughout the topology.

This cannot be changed after creation.

§replica_groups: Vec<ReplicaGroup>

Different group of replicas with specific configuration as role, resources, affinity rules, and more. Each group will be deployed as a separate StatefulSet.

§external_replication_nodes: Vec<ExternalReplicationNode>

List of external replication nodes. This is used to configure replication between different Kanidm clusters.

WARNING: admin and idm_admin passwords are going to be reset.

§image: String

Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like StatefulSets.

§log_level: KanidmLogLevel

Log level for Kanidm.

§port_name: String

Port name used for the pods and governing service. Default: “https”

§image_pull_policy: Option<String>

Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images

§env: Option<Vec<EnvVar>>

List of environment variables to set in the kanidm container. This can be used to set Kanidm configuration options. More info: https://kanidm.github.io/kanidm/master/server_configuration.html

§oauth2_client_namespace_selector: Option<LabelSelector>

Namespaces to match for KanidmOAuth2Clients discovery.

An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

§group_namespace_selector: Option<LabelSelector>

Namespaces to match for KanidmGroups discovery.

An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

§person_namespace_selector: Option<LabelSelector>

Namespaces to match for KanidmPersonAccounts discovery.

An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

§storage: Option<KanidmStorage>

StorageSpec defines the configured storage for a group Kanidm servers. If no storage option is specified, then by default an EmptyDir will be used.

If multiple storage options are specified, priority will be given as follows:

  1. emptyDir
  2. ephemeral
  3. volumeClaimTemplate

Note: Kaniop does not resize PVCs until Kubernetes fix KEP-4650. Although, StatefulSet will be recreated if the PVC is resized.

§ldap_port_name: Option<String>

Defines the port name used for the LDAP service. If not defined, LDAP service will not be configured. Service port will be 3636.

StartTLS is not supported due to security risks such as credential leakage and MITM attacks that are fundamental in how StartTLS works. StartTLS can not be repaired to prevent this. LDAPS is the only secure method of communicating to any LDAP server. Kanidm will use its certificates for both HTTPS and LDAPS.

§tls_secret_name: Option<String>

Specifies the name of the secret holding the TLS private key and certificate for the server. If not provided, the ingress secret will be used. The server will not start if the secret is missing.

§service: Option<KanidmService>

Service defines the service configuration for the Kanidm server.

§ingress: Option<KanidmIngress>

Ingress defines the ingress configuration for the Kanidm server. Domain will be the host for the ingress. TLS is required.

§volumes: Option<Vec<Volume>>

Volumes allows the configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

§volume_mounts: Option<Vec<VolumeMount>>

VolumeMounts allows the configuration of additional VolumeMounts.

VolumeMounts will be appended to other VolumeMounts in the kanidm’ container, that are generated as a result of StorageSpec objects.

§persistent_volume_claim_retention_policy: Option<StatefulSetPersistentVolumeClaimRetentionPolicy>

The field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is a beta field from 1.27. It requires enabling the StatefulSetAutoDeletePVC feature gate.

§security_context: Option<PodSecurityContext>

SecurityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

§dns_policy: Option<String>

Defines the DNS policy for the pods.

§dns_config: Option<PodDNSConfig>

Defines the DNS configuration for the pods.

§containers: Option<Vec<Container>>

Containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch.

The name of container managed by the operator is: kanidm

Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

§init_containers: Option<Vec<Container>>

InitContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Kanidm configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.

The names of init container name managed by the operator are: * init-config-reloader.

Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

§min_ready_seconds: Option<i32>

Minimum number of seconds for which a newly created Pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)

§host_aliases: Option<Vec<HostAlias>>

Optional list of hosts and IPs that will be injected into the Pod’s hosts file if specified.

§host_network: Option<bool>

Use the host’s network namespace if true.

Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/).

When hostNetwork is enabled, this will set the DNS policy to ClusterFirstWithHostNet automatically.

Trait Implementations§

Source§

impl Clone for KanidmSpec

Source§

fn clone(&self) -> KanidmSpec

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KanidmSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for KanidmSpec

Source§

fn default() -> KanidmSpec

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for KanidmSpec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for KanidmSpec

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for KanidmSpec

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,