Skip to content

Commit

Permalink
updates example deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
timbastin committed Dec 27, 2024
1 parent e6ca24d commit e070ed9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 20 deletions.
6 changes: 3 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ type Config struct {
RegistryProxies []string `yaml:"registryProxy" env:"SBOM_REGISTRY_PROXY" flag:"registryProxy"`
Verbosity string `env:"SBOM_VERBOSITY" flag:"verbosity"`

DevGuardToken string `yaml:"devGuardToken" env:"DEVGUARD_TOKEN" flag:"token"`
DevGuardApiURL string `yaml:"devGuardApiURL" env:"DEVGUARD_API_URL" flag:"apiUrl"`
DevGuardProjectID string `yaml:"devGuardProjectID" env:"DEVGUARD_PROJECT_ID" flag:"projectName"`
DevGuardToken string `yaml:"devGuardToken" env:"DEVGUARD_TOKEN" flag:"token"`
DevGuardApiURL string `yaml:"devGuardApiURL" env:"DEVGUARD_API_URL" flag:"apiUrl"`
DevGuardProjectName string `yaml:"devGuardProjectID" env:"DEVGUARD_PROJECT_NAME" flag:"projectName"`
}

var (
Expand Down
20 changes: 8 additions & 12 deletions deploy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/name: devguard-operator
name: devguard-operator
namespace: default
namespace: devguard
spec:
selector:
matchLabels:
Expand All @@ -15,26 +15,22 @@ spec:
app.kubernetes.io/name: devguard-operator
spec:
containers:
- image: ghcr.io/ckotzbauer/devguard-operator:latest
- image: ghcr.io/l3montree-dev/devguard-operator:latest
name: operator
env:
- name: SBOM_GIT_ACCESS_TOKEN
- name: DEVGUARD_TOKEN
valueFrom:
secretKeyRef:
name: "devguard-operator"
key: "accessToken"
key: "devguard-token"
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
args:
# example values
- --cron="0 6 * * * *"
- [email protected]
- --git-author-name=mybotuser
- --git-repository=https://github.com/myorg/my-sbom-repo
#- --git-path=dev-cluster/sboms
#- --pod-label-selector=devguard-operator\=true
- name: DEVGUARD_API_URL
value: "https://api.devguard.org"
- name: DEVGUARD_PROJECT_NAME
value: "devguard-operator"
ports:
- containerPort: 8080
name: http
Expand Down
2 changes: 1 addition & 1 deletion deploy/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: devguard-operator
namespace: default
namespace: devguard
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ func newRootCmd() *cobra.Command {
rootCmd.PersistentFlags().String(ConfigDevGuardApiURL, "", "DevGuard Api URL")
rootCmd.PersistentFlags().String(ConfigDevGuardProjectName, "", "DevGuard Project Name (eg. l3montree-cybersecurity/projects/devguard)")

rootCmd.MarkPersistentFlagRequired(ConfigDevGuardToken)
rootCmd.MarkPersistentFlagRequired(ConfigDevGuardProjectName)

return rootCmd
}

Expand Down
2 changes: 1 addition & 1 deletion processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (p *Processor) scanPod(pod libk8s.PodInfo) {
func initTargets() []Target {
targets := make([]Target, 0)

t := NewDevGuardTarget(OperatorConfig.DevGuardToken, OperatorConfig.DevGuardApiURL, OperatorConfig.DevGuardProjectID, nil)
t := NewDevGuardTarget(OperatorConfig.DevGuardToken, OperatorConfig.DevGuardApiURL, OperatorConfig.DevGuardProjectName, nil)
targets = append(targets, t)

return targets
Expand Down

0 comments on commit e070ed9

Please sign in to comment.