Skip to content
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

Add zync controller #5

Merged
merged 38 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
26a3121
Add zync crd reference
raelga Jun 19, 2020
6742ae0
Fix simple cr example
raelga Jun 19, 2020
e4bb0ff
Camelase env variables
raelga Jun 19, 2020
59790d8
Add role metadata
raelga Jun 19, 2020
4a22d64
Add zync CRD
raelga Jun 19, 2020
f575aa0
Add zync simple cr example
raelga Jun 19, 2020
98df3ec
Add simple echoing task
raelga Jun 19, 2020
8e9398d
Add zync database secret definition
raelga Jun 19, 2020
ea50ae2
Add zync pod monitors
raelga Jun 19, 2020
ff0eacc
Add zync service
raelga Jun 19, 2020
f3c10ec
Add zync defaults
raelga Jun 19, 2020
c3c167d
Add zync and zync-que deployments
raelga Jun 19, 2020
81c01d2
Use the common vars
raelga Jun 19, 2020
25fbcee
Define railsLogsToStdout as boolean
raelga Jun 19, 2020
641918a
Resort documentation examples
raelga Jun 19, 2020
853ba8a
Rename cr
raelga Jun 19, 2020
23c9907
Change zync crd to apiextensions.k8s.io/v1beta1
raelga Jun 22, 2020
5c81785
Add zync crd to the operator rbac
raelga Jun 22, 2020
2e293b5
Add zync crd to the operator watch
raelga Jun 22, 2020
b509b4b
Add zync crd to the operator deploy target
raelga Jun 22, 2020
db8f0c1
Fix typo in zync cr
raelga Jun 22, 2020
ae768dc
Add zync grafana dashboard
raelga Jun 22, 2020
67834ee
Rename secret variable name
raelga Jun 22, 2020
62d0548
Fix typo in documentation
raelga Jun 22, 2020
69ab6b9
Add zync to the main README
raelga Jun 22, 2020
5c7ba0f
Remove duplicated line
raelga Jun 22, 2020
67d7f3c
Add missing default value
raelga Jun 22, 2020
4d18cec
Add missing default value
raelga Jun 23, 2020
905756d
Move version section to the end
raelga Jun 23, 2020
33f141a
Remove echo task
raelga Jun 23, 2020
c0ecb7b
Rename image version to image tag
raelga Jun 23, 2020
8d96e0b
Quote resources
raelga Jun 23, 2020
88a0ad6
Use dev as default railsEnv value
raelga Jun 23, 2020
8280b17
Use boolean as default
raelga Jun 23, 2020
a63e7cc
Remove specific api group resources
raelga Jun 23, 2020
b64c40b
Bump version to 0.3.0
raelga Jun 23, 2020
6d8db0e
Default replicas to 2, example cr to 1
raelga Jun 23, 2020
eb42a73
Remove railsEnv from example cr
raelga Jun 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 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,14 @@
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
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: {}
version: v1alpha1
raelga marked this conversation as resolved.
Show resolved Hide resolved
versions:
- name: v1alpha1
served: true
storage: true
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)
version:
type: string
description: Image version
raelga marked this conversation as resolved.
Show resolved Hide resolved
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
1 change: 1 addition & 0 deletions deploy/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ rules:
resources:
- '*'
raelga marked this conversation as resolved.
Show resolved Hide resolved
- backends
- zyncs
verbs:
- create
- delete
Expand Down
Loading