Skip to content

Commit

Permalink
add base resources
Browse files Browse the repository at this point in the history
  • Loading branch information
templarfelix committed Apr 9, 2024
1 parent 9d37a70 commit ca898b1
Show file tree
Hide file tree
Showing 9 changed files with 630 additions and 9 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,15 @@ catalog-build: opm ## Build a catalog image.
.PHONY: catalog-push
catalog-push: ## Push a catalog image.
$(MAKE) docker-push IMG=$(CATALOG_IMG)

## CUSTOM

# ALL FOR TEST
.PHONY: debug
debug: ## debug
$(MAKE) manifests
$(MAKE) install
$(MAKE) docker-build docker-push IMG=templarfelix/gameserver-operator:latest
$(MAKE) deploy IMG=templarfelix/gameserver-operator:latest


8 changes: 8 additions & 0 deletions api/v1alpha1/dayz_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ type DayzSpec struct {

//+kubebuilder:default="10G"
Storage string `json:"storage,omitempty"`

Config DayzConfig `json:"config,omitempty"`
}

// DayzConfig defines configuration for Dayz & LinuxGSM
type DayzConfig struct {
Server string `json:"server,omitempty"`
GSM string `json:"gsm,omitempty"`
}

// DayzStatus defines the observed state of Dayz
Expand Down
16 changes: 16 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions config/crd/bases/gameserver.templarfelix.com_dayzs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ spec:
spec:
description: DayzSpec defines the desired state of Dayz
properties:
config:
description: DayzConfig defines configuration for Dayz & LinuxGSM
properties:
gsm:
type: string
server:
type: string
type: object
image:
default: gameservermanagers/gameserver:dayz
type: string
Expand Down
1 change: 1 addition & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ spec:
- --leader-elect
image: controller:latest
name: manager
imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
48 changes: 48 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,54 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- gameserver.templarfelix.com
resources:
Expand Down
Loading

0 comments on commit ca898b1

Please sign in to comment.