add organization info to runner status
This commit is contained in:
parent
75d15ee91b
commit
eca3cc7941
|
|
@ -80,14 +80,17 @@ type RunnerStatus struct {
|
||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RunnerStatusRegistration contains runner registration status
|
||||||
type RunnerStatusRegistration struct {
|
type RunnerStatusRegistration struct {
|
||||||
Repository string `json:"repository"`
|
Organization string `json:"organization"`
|
||||||
|
Repository string `json:"repository,omitempty"`
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
ExpiresAt metav1.Time `json:"expiresAt"`
|
ExpiresAt metav1.Time `json:"expiresAt"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
// +kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
|
// +kubebuilder:printcolumn:JSONPath=".spec.organization",name=Organization,type=string
|
||||||
// +kubebuilder:printcolumn:JSONPath=".spec.repository",name=Repository,type=string
|
// +kubebuilder:printcolumn:JSONPath=".spec.repository",name=Repository,type=string
|
||||||
// +kubebuilder:printcolumn:JSONPath=".status.phase",name=Status,type=string
|
// +kubebuilder:printcolumn:JSONPath=".status.phase",name=Status,type=string
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ metadata:
|
||||||
name: runners.actions.summerwind.dev
|
name: runners.actions.summerwind.dev
|
||||||
spec:
|
spec:
|
||||||
additionalPrinterColumns:
|
additionalPrinterColumns:
|
||||||
|
- JSONPath: .spec.organization
|
||||||
|
name: Organization
|
||||||
|
type: string
|
||||||
- JSONPath: .spec.repository
|
- JSONPath: .spec.repository
|
||||||
name: Repository
|
name: Repository
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -6308,17 +6311,20 @@ spec:
|
||||||
reason:
|
reason:
|
||||||
type: string
|
type: string
|
||||||
registration:
|
registration:
|
||||||
|
description: RunnerStatusRegistration contains runner registration status
|
||||||
properties:
|
properties:
|
||||||
expiresAt:
|
expiresAt:
|
||||||
format: date-time
|
format: date-time
|
||||||
type: string
|
type: string
|
||||||
|
organization:
|
||||||
|
type: string
|
||||||
repository:
|
repository:
|
||||||
type: string
|
type: string
|
||||||
token:
|
token:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- expiresAt
|
- expiresAt
|
||||||
- repository
|
- organization
|
||||||
- token
|
- token
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ func (r *RunnerReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
|
||||||
|
|
||||||
updated := runner.DeepCopy()
|
updated := runner.DeepCopy()
|
||||||
updated.Status.Registration = v1alpha1.RunnerStatusRegistration{
|
updated.Status.Registration = v1alpha1.RunnerStatusRegistration{
|
||||||
|
Organization: runner.Spec.Organization,
|
||||||
Repository: runner.Spec.Repository,
|
Repository: runner.Spec.Repository,
|
||||||
Token: rt.GetToken(),
|
Token: rt.GetToken(),
|
||||||
ExpiresAt: metav1.NewTime(rt.GetExpiresAt().Time),
|
ExpiresAt: metav1.NewTime(rt.GetExpiresAt().Time),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue