Skip to content

Commit

Permalink
Use Remote Secret for push token
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorhun committed Sep 27, 2023
1 parent fe1aca0 commit e6117a8
Show file tree
Hide file tree
Showing 6 changed files with 354 additions and 205 deletions.
9 changes: 8 additions & 1 deletion api/v1alpha1/imagerepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ type CredentialsStatus struct {

// PullSecretName is present only if ImageRepository has labels that connect it to Application and Component.
// Holds name of the dockerconfig secret with credentials to pull only from the generated repository.
// The secret is not present in the same namespace as ImageRepository, but created in
// The secret might not be present in the same namespace as ImageRepository, but created in other environments.
PullSecretName string `json:"pull-secret,omitempty"`

// PushRobotAccountName holds name of the quay robot account with write (push and pull) permissions into the generated repository.
Expand All @@ -117,6 +117,13 @@ type CredentialsStatus struct {
// PullRobotAccountName is present only if ImageRepository has labels that connect it to Application and Component.
// Holds name of the quay robot account with real (pull only) permissions from the generated repository.
PullRobotAccountName string `json:"pull-robot-account,omitempty"`

// PushRemoteSecretName holds name of RemoteSecret object that manages push Secret and its linking to pipeline Service Account.
PushRemoteSecretName string `json:"push-remote-secret,omitempty"`

// PullRemoteSecretName is present only if ImageRepository has labels that connect it to Application and Component.
// Holds the name of the RemoteSecret object that manages pull Secret.
PullRemoteSecretName string `json:"pull-remote-secret,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
15 changes: 13 additions & 2 deletions config/crd/bases/appstudio.redhat.com_imagerepositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ spec:
were generated.
format: date-time
type: string
pull-remote-secret:
description: PullRemoteSecretName is present only if ImageRepository
has labels that connect it to Application and Component. Holds
the name of the RemoteSecret object that manages pull Secret.
type: string
pull-robot-account:
description: PullRobotAccountName is present only if ImageRepository
has labels that connect it to Application and Component. Holds
Expand All @@ -92,8 +97,14 @@ spec:
description: PullSecretName is present only if ImageRepository
has labels that connect it to Application and Component. Holds
name of the dockerconfig secret with credentials to pull only
from the generated repository. The secret is not present in
the same namespace as ImageRepository, but created in
from the generated repository. The secret might not be present
in the same namespace as ImageRepository, but created in other
environments.
type: string
push-remote-secret:
description: PushRemoteSecretName holds name of RemoteSecret object
that manages push Secret and its linking to pipeline Service
Account.
type: string
push-robot-account:
description: PushRobotAccountName holds name of the quay robot
Expand Down
Loading

0 comments on commit e6117a8

Please sign in to comment.