Skip to content

Commit

Permalink
change Impersonate-Group param to array (#509)
Browse files Browse the repository at this point in the history
* change Impersonate-Group param to array

* update github.com/equinor/radix-common ref to 1.3.0

* remove commented code

---------

Co-authored-by: Nils Gustav Stråbø <nst@equinor.com>
  • Loading branch information
nilsgstrabo and nilsgstrabo committed Jun 30, 2023
1 parent 90052df commit f6f815f
Show file tree
Hide file tree
Showing 12 changed files with 228 additions and 80 deletions.
32 changes: 24 additions & 8 deletions api/alerting/alerting_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ func UpdateEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWr
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -181,7 +183,9 @@ func GetEnvironmentAlertingConfig(accounts models.Accounts, w http.ResponseWrite
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -234,7 +238,9 @@ func EnableEnvironmentAlerting(accounts models.Accounts, w http.ResponseWriter,
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -289,7 +295,9 @@ func DisableEnvironmentAlerting(accounts models.Accounts, w http.ResponseWriter,
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -344,7 +352,9 @@ func UpdateApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWr
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -400,7 +410,9 @@ func GetApplicationAlertingConfig(accounts models.Accounts, w http.ResponseWrite
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -447,7 +459,9 @@ func EnableApplicationAlerting(accounts models.Accounts, w http.ResponseWriter,
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -496,7 +510,9 @@ func DisableApplicationAlerting(accounts models.Accounts, w http.ResponseWriter,
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down
60 changes: 45 additions & 15 deletions api/applications/applications_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ func (ac *applicationController) ShowApplications(accounts models.Accounts, w ht
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -207,7 +209,9 @@ func (ac *applicationController) SearchApplications(accounts models.Accounts, w
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -278,7 +282,9 @@ func (ac *applicationController) GetApplication(accounts models.Accounts, w http
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -329,7 +335,9 @@ func (ac *applicationController) IsDeployKeyValidHandler(accounts models.Account
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -375,7 +383,9 @@ func (ac *applicationController) RegenerateMachineUserTokenHandler(accounts mode
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -431,7 +441,9 @@ func (ac *applicationController) RegenerateDeployKeyHandler(accounts models.Acco
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "204":
Expand Down Expand Up @@ -475,7 +487,9 @@ func (ac *applicationController) GetDeployKeyAndSecret(accounts models.Accounts,
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -519,7 +533,9 @@ func (ac *applicationController) RegisterApplication(accounts models.Accounts, w
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -574,7 +590,9 @@ func (ac *applicationController) ChangeRegistrationDetails(accounts models.Accou
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -633,7 +651,9 @@ func (ac *applicationController) ModifyRegistrationDetails(accounts models.Accou
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -686,7 +706,9 @@ func (ac *applicationController) DeleteApplication(accounts models.Accounts, w h
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -758,7 +780,9 @@ func (ac *applicationController) TriggerPipelineBuild(accounts models.Accounts,
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -805,7 +829,9 @@ func (ac *applicationController) TriggerPipelineBuildDeploy(accounts models.Acco
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -852,7 +878,9 @@ func (ac *applicationController) TriggerPipelineDeploy(accounts models.Accounts,
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -899,7 +927,9 @@ func (ac *applicationController) TriggerPipelinePromote(accounts models.Accounts
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down
8 changes: 6 additions & 2 deletions api/buildsecrets/buildsecrets_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ func GetBuildSecrets(accounts models.Accounts, w http.ResponseWriter, r *http.Re
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -115,7 +117,9 @@ func ChangeBuildSecret(accounts models.Accounts, w http.ResponseWriter, r *http.
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down
16 changes: 12 additions & 4 deletions api/deployments/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ func GetDeployments(accounts models.Accounts, w http.ResponseWriter, r *http.Req
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -143,7 +145,9 @@ func GetDeployment(accounts models.Accounts, w http.ResponseWriter, r *http.Requ
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -192,7 +196,9 @@ func GetComponents(accounts models.Accounts, w http.ResponseWriter, r *http.Requ
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down Expand Up @@ -274,7 +280,9 @@ func GetPodLog(accounts models.Accounts, w http.ResponseWriter, r *http.Request)
// - name: Impersonate-Group
// in: header
// description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)
// type: string
// type: array
// items:
// type: string
// required: false
// responses:
// "200":
Expand Down
Loading

0 comments on commit f6f815f

Please sign in to comment.