Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix the loglevel command
Signed-off-by: Abdul Hameed <ahameed@redhat.com>
  • Loading branch information
redhatHameed committed Dec 5, 2024
commit fa79e952097cd6467bb1820c6ae3f3f78ce871dc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: feast.dev/v1alpha1
kind: FeatureStore
metadata:
name: sample-services-loglevel
spec:
feastProject: my_project
services:
onlineStore:
logLevel: debug
offlineStore:
logLevel: debug
registry:
logLevel: info
local:
persistence:
file:
path: /data/registry.db
Comment thread
tchughesiv marked this conversation as resolved.
Outdated
21 changes: 14 additions & 7 deletions infra/feast-operator/internal/controller/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,29 +355,36 @@ func (feast *FeastServices) setDeployment(deploy *appsv1.Deployment, feastType F
}

func (feast *FeastServices) getContainerCommand(feastType FeastServiceType) []string {
deploySettings := FeastServiceConstants[feastType]
targetPort := deploySettings.TargetHttpPort
baseCommand := "feast"
options := []string{}
logLevel := feast.getLogLevelForType(feastType)
if logLevel != nil {
deploySettings.Command = append(deploySettings.Command, []string{"--log-level", strings.ToUpper(*logLevel)}...)
options = append(options, "--log-level", strings.ToUpper(*logLevel))
}

deploySettings := FeastServiceConstants[feastType]
targetPort := deploySettings.TargetHttpPort
tls := feast.getTlsConfigs(feastType)
if tls.IsTLS() {
targetPort = deploySettings.TargetHttpsPort
feastTlsPath := GetTlsPath(feastType)
deploySettings.Command = append(deploySettings.Command, []string{"--key", feastTlsPath + tls.SecretKeyNames.TlsKey,
deploySettings.Args = append(deploySettings.Args, []string{"--key", feastTlsPath + tls.SecretKeyNames.TlsKey,
"--cert", feastTlsPath + tls.SecretKeyNames.TlsCrt}...)
}
deploySettings.Command = append(deploySettings.Command, []string{"-p", strconv.Itoa(int(targetPort))}...)
deploySettings.Args = append(deploySettings.Args, []string{"-p", strconv.Itoa(int(targetPort))}...)

if feastType == OfflineFeastType {
if tls.IsTLS() && feast.Handler.FeatureStore.Status.Applied.Services.OfflineStore.TLS.VerifyClient != nil {
deploySettings.Command = append(deploySettings.Command,
deploySettings.Args = append(deploySettings.Args,
[]string{"--verify_client", strconv.FormatBool(*feast.Handler.FeatureStore.Status.Applied.Services.OfflineStore.TLS.VerifyClient)}...)
}
}

return deploySettings.Command
// Combine base command, options, and arguments
feastCommand := append([]string{baseCommand}, options...)
feastCommand = append(feastCommand, deploySettings.Args...)

return feastCommand
}

func (feast *FeastServices) offlineClientPodConfigs(podSpec *corev1.PodSpec) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ var (

FeastServiceConstants = map[FeastServiceType]deploymentSettings{
OfflineFeastType: {
Command: []string{"feast", "serve_offline", "-h", "0.0.0.0"},
Args: []string{"serve_offline", "-h", "0.0.0.0"},
TargetHttpPort: 8815,
TargetHttpsPort: 8816,
},
OnlineFeastType: {
Command: []string{"feast", "serve", "-h", "0.0.0.0"},
Args: []string{"serve", "-h", "0.0.0.0"},
TargetHttpPort: 6566,
TargetHttpsPort: 6567,
},
RegistryFeastType: {
Command: []string{"feast", "serve_registry"},
Args: []string{"serve_registry"},
TargetHttpPort: 6570,
TargetHttpsPort: 6571,
},
Expand Down Expand Up @@ -234,7 +234,7 @@ type AuthzConfig struct {
}

type deploymentSettings struct {
Command []string
Args []string
TargetHttpPort int32
TargetHttpsPort int32
}