mirror of
https://github.com/siderolabs/omni.git
synced 2025-08-06 17:46:59 +02:00
Some checks are pending
default / default (push) Waiting to run
default / e2e-backups (push) Blocked by required conditions
default / e2e-cluster-import (push) Blocked by required conditions
default / e2e-forced-removal (push) Blocked by required conditions
default / e2e-omni-upgrade (push) Blocked by required conditions
default / e2e-scaling (push) Blocked by required conditions
default / e2e-short (push) Blocked by required conditions
default / e2e-short-secureboot (push) Blocked by required conditions
default / e2e-templates (push) Blocked by required conditions
default / e2e-upgrades (push) Blocked by required conditions
default / e2e-workload-proxy (push) Blocked by required conditions
The commands added: ``` omnictl jointoken create omnictl jointoken delete omnictl jointoken renew omnictl jointoken revoke omnictl jointoken unrevoke omnictl jointoken make-default ``` Fixes: https://github.com/siderolabs/omni/issues/1093 Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
104 lines
3.2 KiB
Go
104 lines
3.2 KiB
Go
// Copyright (c) 2025 Sidero Labs, Inc.
|
|
//
|
|
// Use of this software is governed by the Business Source License
|
|
// included in the LICENSE file.
|
|
|
|
package omni
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/cosi-project/runtime/pkg/state"
|
|
"go.uber.org/zap"
|
|
|
|
"github.com/siderolabs/omni/internal/backend/runtime/omni/controllers/omni/etcdbackup/store"
|
|
"github.com/siderolabs/omni/internal/backend/runtime/omni/validated"
|
|
"github.com/siderolabs/omni/internal/pkg/config"
|
|
)
|
|
|
|
func NewMockState(st state.State) *State {
|
|
return &State{
|
|
defaultState: st,
|
|
}
|
|
}
|
|
|
|
func NewEtcdPersistentState(ctx context.Context, params *config.Params, logger *zap.Logger) (*PersistentState, error) {
|
|
return newEtcdPersistentState(ctx, params, logger)
|
|
}
|
|
|
|
func GetEmbeddedEtcdClientWithServer(params *config.EtcdParams, logger *zap.Logger) (EtcdState, error) {
|
|
return getEmbeddedEtcdState(params, logger)
|
|
}
|
|
|
|
func ClusterValidationOptions(st state.State, etcdBackupConfig config.EtcdBackup, embeddedDiscoveryServiceConfig *config.EmbeddedDiscoveryService) []validated.StateOption {
|
|
return clusterValidationOptions(st, etcdBackupConfig, embeddedDiscoveryServiceConfig)
|
|
}
|
|
|
|
func RelationLabelsValidationOptions() []validated.StateOption {
|
|
return relationLabelsValidationOptions()
|
|
}
|
|
|
|
func MachineSetValidationOptions(st state.State, etcdBackupStoreFactory store.Factory) []validated.StateOption {
|
|
return machineSetValidationOptions(st, etcdBackupStoreFactory)
|
|
}
|
|
|
|
func MachineSetNodeValidationOptions(st state.State) []validated.StateOption {
|
|
return machineSetNodeValidationOptions(st)
|
|
}
|
|
|
|
func MachineClassValidationOptions(st state.State) []validated.StateOption {
|
|
return machineClassValidationOptions(st)
|
|
}
|
|
|
|
func IdentityValidationOptions(samlConfig config.SAML) []validated.StateOption {
|
|
return identityValidationOptions(samlConfig)
|
|
}
|
|
|
|
func ExposedServiceValidationOptions() []validated.StateOption {
|
|
return exposedServiceValidationOptions()
|
|
}
|
|
|
|
func ConfigPatchValidationOptions(st state.State) []validated.StateOption {
|
|
return configPatchValidationOptions(st)
|
|
}
|
|
|
|
func EtcdManualBackupValidationOptions() []validated.StateOption {
|
|
return etcdManualBackupValidationOptions()
|
|
}
|
|
|
|
func SAMLLabelRuleValidationOptions() []validated.StateOption {
|
|
return samlLabelRuleValidationOptions()
|
|
}
|
|
|
|
func S3ConfigValidationOptions() []validated.StateOption {
|
|
return s3ConfigValidationOptions()
|
|
}
|
|
|
|
func SchematicConfigurationValidationOptions() []validated.StateOption {
|
|
return schematicConfigurationValidationOptions()
|
|
}
|
|
|
|
func MachineRequestSetValidationOptions(st state.State) []validated.StateOption {
|
|
return machineRequestSetValidationOptions(st)
|
|
}
|
|
|
|
func InfraMachineConfigValidationOptions(st state.State) []validated.StateOption {
|
|
return infraMachineConfigValidationOptions(st)
|
|
}
|
|
|
|
func NodeForceDestroyRequestValidationOptions(st state.State) []validated.StateOption {
|
|
return nodeForceDestroyRequestValidationOptions(st)
|
|
}
|
|
|
|
func JoinTokenValidationOptions(st state.State) []validated.StateOption {
|
|
return joinTokenValidationOptions(st)
|
|
}
|
|
|
|
func DefaultJoinTokenValidationOptions(st state.State) []validated.StateOption {
|
|
return defaultJoinTokenValidationOptions(st)
|
|
}
|
|
|
|
func ImportedClusterSecretValidationOptions(st state.State, clusterImportEnabled bool) []validated.StateOption {
|
|
return importedClusterSecretValidationOptions(st, clusterImportEnabled)
|
|
}
|