github.com/cilium/cilium@v1.16.2/operator/auth/cell.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package auth 5 6 import ( 7 "github.com/cilium/hive/cell" 8 "github.com/spf13/pflag" 9 10 "github.com/cilium/cilium/operator/auth/spire" 11 ) 12 13 const ( 14 mutualAuthEnabled = "mesh-auth-mutual-enabled" 15 ) 16 17 var Cell = cell.Module( 18 "auth-identity", 19 "Cilium Mutual Authentication Identity management", 20 spire.Cell, 21 cell.Config(Config{}), 22 cell.Invoke(registerIdentityWatcher), 23 ) 24 25 // Config contains the configuration for the identity-gc. 26 type Config struct { 27 Enabled bool `mapstructure:"mesh-auth-mutual-enabled"` 28 } 29 30 // Flags implements cell.Flagger interface. 31 func (cfg Config) Flags(flags *pflag.FlagSet) { 32 flags.Bool(mutualAuthEnabled, cfg.Enabled, "Enable mutual authentication in Cilium") 33 }