Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROX-26359: Switch Authentication Type Probe Service Update #2051

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,7 @@ test/e2e/probe/run: IMAGE_REF="$(external_image_registry)/$(probe_image_reposito
test/e2e/probe/run:
$(DOCKER) run \
-e QUOTA_TYPE="OCM" \
-e AUTH_TYPE="OCM" \
-e PROBE_NAME="e2e-probe-$$$$" \
-e OCM_USERNAME="${OCM_USERNAME}" \
-e OCM_TOKEN="${OCM_TOKEN}" \
-e FLEET_MANAGER_ENDPOINT="${FLEET_MANAGER_ENDPOINT}" \
--rm $(IMAGE_REF) \
run
Expand Down
6 changes: 0 additions & 6 deletions probe/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type Config struct {
FleetManagerEndpoint string `env:"FLEET_MANAGER_ENDPOINT" envDefault:"http://127.0.0.1:8000"`
MetricsAddress string `env:"METRICS_ADDRESS" envDefault:":7070"`
RHSSOClientID string `env:"RHSSO_SERVICE_ACCOUNT_CLIENT_ID"`
OCMUsername string `env:"OCM_USERNAME"`
ProbeName string `env:"PROBE_NAME" envDefault:"${HOSTNAME}" envExpand:"true"`
ProbeCleanUpTimeout time.Duration `env:"PROBE_CLEANUP_TIMEOUT" envDefault:"5m"`
ProbeHTTPRequestTimeout time.Duration `env:"PROBE_HTTP_REQUEST_TIMEOUT" envDefault:"5s"`
Expand Down Expand Up @@ -65,11 +64,6 @@ func GetConfig() (*Config, error) {
configErrors.AddError(errors.New("RHSSO_SERVICE_ACCOUNT_CLIENT_ID unset in the environment"))
}
c.ProbeUsername = fmt.Sprintf("service-account-%s", c.RHSSOClientID)
case "OCM":
if c.OCMUsername == "" {
configErrors.AddError(errors.New("OCM_USERNAME unset in the environment"))
}
c.ProbeUsername = c.OCMUsername
default:
configErrors.AddError(errors.New("AUTH_TYPE not supported"))
}
Expand Down
10 changes: 5 additions & 5 deletions templates/probe-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ objects:
- name: FLEET_MANAGER_ENDPOINT
value: ${FLEET_MANAGER_ENDPOINT}
- name: AUTH_TYPE
value: OCM
- name: OCM_USERNAME
value: RHSSO
- name: RHSSO_SERVICE_ACCOUNT_CLIENT_ID
valueFrom:
secretKeyRef:
name: probe-credentials
key: OCM_USERNAME
- name: OCM_TOKEN
key: RHSSO_SERVICE_ACCOUNT_CLIENT_ID
- name: RHSSO_SERVICE_ACCOUNT_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: probe-credentials
key: OCM_TOKEN
key: RHSSO_SERVICE_ACCOUNT_CLIENT_SECRET
- name: CENTRAL_SPECS
value: ${CENTRAL_SPECS}
ports:
Expand Down
Loading