Skip to content

Commit

Permalink
Merge pull request #5 from 3scale/feature/add-zync
Browse files Browse the repository at this point in the history
Add zync controller
  • Loading branch information
raelga authored Jun 24, 2020
2 parents ee94f30 + eb42a73 commit 51e4eea
Show file tree
Hide file tree
Showing 17 changed files with 3,826 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ else ifeq (${UNAME}, Darwin)
INPLACE_SED=sed -i ""
endif

TAG ?= v0.2.0
TAG ?= v0.3.0
REGISTRY ?= quay.io
ORG ?= 3scale
PROJECT ?= 3scale-saas-operator
Expand All @@ -36,6 +36,7 @@ namespace-create: # NAMESPACE MANAGEMENT - Create namespace for the operator
operator-deploy: namespace-create ## OPERATOR DEPLOY - Deploy Operator objects (namespace, CRDs, service account, role, role binding and operator deployment)
$(KUBE_CLIENT) apply -f deploy/crds/saas.3scale.net_autossls_crd.yaml --validate=false || true
$(KUBE_CLIENT) apply -f deploy/crds/saas.3scale.net_backends_crd.yaml --validate=false || true
$(KUBE_CLIENT) apply -f deploy/crds/saas.3scale.net_zyncs_crd.yaml --validate=false || true
$(KUBE_CLIENT) apply -f deploy/service_account.yaml -n $(NAMESPACE)
$(KUBE_CLIENT) apply -f deploy/role.yaml -n $(NAMESPACE)
$(KUBE_CLIENT) apply -f deploy/role_binding.yaml -n $(NAMESPACE)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ A Kubernetes Operator based on the Operator SDK to manage 3scale SaaS (hosted ve
Current 3scale SaaS controllers supported:
* AutoSSL
* Backend
* Zync

Future 3scale SaaS controllers to be added:
* System
* Zync
* Apicast
* MappingService
* CORSProxy
Expand All @@ -29,6 +29,7 @@ Future 3scale SaaS controllers to be added:
* [Getting started](docs/getting-started.md)
* [AutoSSL Custom Resource Reference](docs/autossl-crd-reference.md)
* [Backend Custom Resource Reference](docs/backend-crd-reference.md)
* [Zync Custom Resource Reference](docs/zync-crd-reference.md)

## License

Expand Down
16 changes: 16 additions & 0 deletions deploy/crds/saas.3scale.net_v1alpha1_zync_cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: saas.3scale.net/v1alpha1
kind: Zync
metadata:
name: example
spec:
secret:
vaultPath: secret/data/openshift/cluster-example/3scale/zync
zync:
replicas: 1
resources:
limits:
cpu: "1"
env:
dbWaitSleepSeconds: 1
que:
replicas: 1
217 changes: 217 additions & 0 deletions deploy/crds/saas.3scale.net_zyncs_crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: zyncs.saas.3scale.net
spec:
group: saas.3scale.net
names:
kind: Zync
listKind: ZyncList
plural: zyncs
singular: zync
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
type: object
description: Zync is the Schema for a Zync instance
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:
type: object
description: ZyncSpec defines the desired state of Zync
required:
- secret
properties:
image:
type: object
properties:
name:
type: string
description: Image name (docker repository)
tag:
type: string
description: Image tag
pullSecretName:
type: string
description: Quay pull secret for private repository
secret:
type: object
required:
- vaultPath
properties:
vaultPath:
type: string
description: Vault Path with zync database secret definition
zync:
type: object
properties:
replicas:
type: integer
description: Number of replicas
env:
type: object
properties:
dbWaitSleepSeconds:
type: integer
description: Sleep delay while waiting for the zync database
railsLogsToStdout:
type: boolean
description: Rails log to std output toggle for zync
railsEnv:
type: string
description: Rails environment for zync
resources:
type: object
properties:
requests:
type: object
properties:
cpu:
type: string
pattern: "[0-9]+m?"
description: Override CPU requests
memory:
type: string
pattern: "[0-9]+([kKmMgGtTpPeE]i?)?$"
description: Override Memory requests
limits:
type: object
properties:
cpu:
type: string
pattern: "[0-9]+m?"
description: Override CPU limits
memory:
type: string
pattern: "[0-9]+([kKmMgGtTpPeE]i?)?$"
description: Override Memory limits
livenessProbe:
type: object
properties:
timeoutSeconds:
type: integer
description: Override liveness probe timeout (seconds)
periodSeconds:
type: integer
description: Override liveness probe period (seconds)
successThreshold:
type: integer
description: Override liveness probe success threshold
failureThreshold:
type: integer
description: Override liveness probe failure threshold
readinessProbe:
type: object
properties:
timeoutSeconds:
type: integer
description: Override readiness probe timeout (seconds)
periodSeconds:
type: integer
description: Override readiness probe period (seconds)
successThreshold:
type: integer
description: Override readiness probe success threshold
failureThreshold:
type: integer
description: Override readiness probe failure threshold
que:
type: object
properties:
replicas:
type: integer
description: Number of replicas
env:
type: object
properties:
railsLogsToStdout:
type: boolean
description: Rails log to std output toggle for zync
railsEnv:
type: string
description: Rails environment for zync
resources:
type: object
properties:
requests:
type: object
properties:
cpu:
type: string
pattern: "[0-9]+m?"
description: Override CPU requests
memory:
type: string
pattern: "[0-9]+([kKmMgGtTpPeE]i?)?$"
description: Override Memory requests
limits:
type: object
properties:
cpu:
type: string
pattern: "[0-9]+m?"
description: Override CPU limits
memory:
type: string
pattern: "[0-9]+([kKmMgGtTpPeE]i?)?$"
description: Override Memory limits
livenessProbe:
type: object
properties:
timeoutSeconds:
type: integer
description: Override liveness probe timeout (seconds)
periodSeconds:
type: integer
description: Override liveness probe period (seconds)
successThreshold:
type: integer
description: Override liveness probe success threshold
failureThreshold:
type: integer
description: Override liveness probe failure threshold
readinessProbe:
type: object
properties:
timeoutSeconds:
type: integer
description: Override readiness probe timeout (seconds)
periodSeconds:
type: integer
description: Override readiness probe period (seconds)
successThreshold:
type: integer
description: Override readiness probe success threshold
failureThreshold:
type: integer
description: Override readiness probe failure threshold
grafanaDashboard:
type: object
properties:
label:
type: object
properties:
key:
type: string
description: Label key used by grafana-operator for dashboard discovery
value:
type: string
description: Label value used by grafana-operator for dashboard discovery
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
3 changes: 1 addition & 2 deletions deploy/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,11 @@ rules:
- saas.3scale.net
resources:
- '*'
- backends
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- watch
Loading

0 comments on commit 51e4eea

Please sign in to comment.