Skip to content

Commit

Permalink
add ci job (#1)
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Luz Almeida <[email protected]>
  • Loading branch information
leoluz authored Jun 21, 2024
1 parent bb7f209 commit 9d87fde
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
name: Compile
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: "1.22"
# see https://github.com/actions/setup-go?tab=readme-ov-file#caching-dependency-files-and-build-outputs
cache-dependency-path: |
go.sum
- name: Check out repo
uses: actions/checkout@v4
- name: Get dependencies
run: go mod download
- name: build
run: make
- name: test
run: make test
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
name: accessrequests.ephemeral-access.argoproj-labs.io
spec:
group: ephemeral-access.argoproj-labs.io
names:
kind: AccessRequest
listKind: AccessRequestList
plural: accessrequests
singular: accessrequest
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: AccessRequest is the Schema for the accessrequests API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: AccessRequestSpec defines the desired state of AccessRequest
properties:
foo:
description: Foo is an example field of AccessRequest. Edit accessrequest_types.go
to remove/update
type: string
type: object
status:
description: AccessRequestStatus defines the observed state of AccessRequest
type: object
type: object
served: true
storage: true
subresources:
status: {}
33 changes: 27 additions & 6 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: argocd-ephemeral-access
app.kubernetes.io/managed-by: kustomize
name: manager-role
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
- apiGroups:
- ephemeral-access.argoproj-labs.io
resources:
- accessrequests
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ephemeral-access.argoproj-labs.io
resources:
- accessrequests/finalizers
verbs:
- update
- apiGroups:
- ephemeral-access.argoproj-labs.io
resources:
- accessrequests/status
verbs:
- get
- patch
- update

0 comments on commit 9d87fde

Please sign in to comment.