Layout, build and templates follow deckhouse/modules-template; dmt lint passes with no findings (Go files are excluded from the Flant-only license-header rule, see .dmtlint.yaml). - module.yaml, openapi schemas with Russian docs, lib-helm templates: https modes, ingress class, publicDomainTemplate, node placement, priority class, PSS-restricted security context, VPA, PDB, Ingress plus Gateway API ListenerSet/HTTPRoute, DexAuthenticator. - module-sdk hooks: hubble CA from d8-cni-cilium (public certificate only), external_auth, copy_custom_certificate. - The app moves to images/cluster-map/src and is split into packages; traffic mode Continuous/OnDemand/Disabled and retention are module settings; graceful shutdown; Prometheus metrics and two alerts; frontend embedded, English and Russian, strict CSP. - Built with werf on Deckhouse's published base images; Makefile publishes the registry layout modules-actions uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.3 KiB
Go
34 lines
1.3 KiB
Go
/*
|
|
Copyright 2026 The cluster-map Authors
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
package main
|
|
|
|
import (
|
|
extauth "github.com/deckhouse/module-sdk/common-hooks/external_auth"
|
|
)
|
|
|
|
// With user-authn enabled and no externalAuthentication in the ModuleConfig,
|
|
// the module deploys its own DexAuthenticator and points the Ingress at it.
|
|
// Anything the user sets explicitly wins.
|
|
var _ = extauth.RegisterHook(extauth.Settings{
|
|
ExternalAuthPath: "clusterMap.auth.externalAuthentication",
|
|
DexAuthenticatorEnabledPath: "clusterMap.internal.deployDexAuthenticator",
|
|
DexExternalAuth: extauth.ExternalAuth{
|
|
AuthURL: "https://cluster-map-dex-authenticator.d8-cluster-map.svc.%CLUSTER_DOMAIN%/dex-authenticator/auth",
|
|
AuthSignInURL: "https://$host/dex-authenticator/sign_in",
|
|
},
|
|
})
|