-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: WIP add crdhandler #196
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: DRAGON <anantvijay3@gmail.com>
PR Description updated to latest commit (0284635) |
Signed-off-by: DRAGON <anantvijay3@gmail.com>
PR Analysis
PR Feedback
How to useInstructions
|
Type
Enhancement
Description
This PR introduces the
crdhandler
package with a focus on handling CustomResourceDefinitions (CRDs) related to Github repositories. The main changes include:GithubRepositoryHandler
struct in thecrdhandler/github
package. This struct and its methods handle the initialization of the Github repository, extraction of frameworks, controls, rules, exceptions, and control configurations from the repository, and cleaning the repository.CrdHandler
struct in thecrdhandler
package. This struct and its methods handle the creation of frameworks, controls, rules, exceptions, and control configurations in the Kubernetes API.crdhandler/github
package, such asGithubRelease
,GithubCommit
,FrameworkJson
,ControlJson
,RuleJson
,Framework
,Control
,Rule
,Exception
, andControlConfiguration
.crdhandler/github
package.main.go
to include the creation of aCrdHandler
instance and the handling of CRDs.CrdHandler
struct and therepositoryHandler
interface in thecrdhandler
package.rules
in the Kubernetes API.PR changes walkthrough
6 files
github.go
crdhandler/github/github.go
This file introduces a new package
crdhandler
with asubpackage
github
. It contains theGithubRepositoryHandler
struct and its associated methods.These methods are responsible for initializing the Github
repository, extracting frameworks, controls, rules,
exceptions, and control configurations from the repository,
and cleaning the repository.
crd.go
crdhandler/crd.go
This file introduces the
CrdHandler
struct and itsassociated methods. These methods handle the creation of
frameworks, controls, rules, exceptions, and control
configurations in the Kubernetes API.
types.go
crdhandler/github/types.go
This file defines various types and structs used in the
crdhandler
package, such asGithubRelease
,GithubCommit
,FrameworkJson
,ControlJson
,RuleJson
,Framework
,Control
,Rule
,Exception
, andControlConfiguration
.utils.go
crdhandler/github/utils.go
This file provides utility functions for unzipping files,
which is used in the
crdhandler
package.main.go
main.go
This file has been updated to include the creation of a
CrdHandler
instance and the handling of CRDs.types.go
crdhandler/types.go
This file defines the
CrdHandler
struct and therepositoryHandler
interface used in thecrdhandler
package.
1 files
rule.yaml
crds/rule.yaml
This file defines the CustomResourceDefinition (CRD) for
rules
in the Kubernetes API.User description
Overview
This PR adds support for CRDs
Signed Commits
How to Test
go run main.go
or
build the operator/deploy in cluster