Skip to content

Commit

Permalink
Feat/crd print collumns (#32)
Browse files Browse the repository at this point in the history
* feat: add print collumn for expiry on crd
  • Loading branch information
samirtahir91 authored Apr 8, 2024
1 parent 8f4dc0f commit 31bbe6b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions api/v1/githubapp_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type GithubAppStatus struct {
//+kubebuilder:subresource:status

// GithubApp is the Schema for the githubapps API
// +kubebuilder:printcolumn:name="Expires At",type=string,JSONPath=`.status.expiresAt`
// +kubebuilder:printcolumn:name="Error",type=string,JSONPath=`.status.error`
type GithubApp struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
9 changes: 8 additions & 1 deletion config/crd/bases/githubapp.samir.io_githubapps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ spec:
singular: githubapp
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.expiresAt
name: Expires At
type: string
- jsonPath: .status.error
name: Error
type: string
name: v1
schema:
openAPIV3Schema:
description: GithubApp is the Schema for the githubapps API
Expand Down
12 changes: 6 additions & 6 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ metadata:
name: manager-role
rules:
- apiGroups:
- "apps"
- ""
resources:
- deployments
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
- apps
resources:
- secrets
- deployments
verbs:
- create
- delete
- get
- list
- patch
Expand Down

0 comments on commit 31bbe6b

Please sign in to comment.