Schema can be configured to be deployed to kubernetes and managed by infra manager.
Behaviour is controlled by k8s-propagation
property in the infra-mgr-config.yml
file.
These are the possible values for this property:
off
- No synchronization will be donedeny
- No synchronization will be done and associated namespece will be removed from the kubernetessync
- Synchronizes repository changes with kubernetesrule
- Synchronizes repository changes with kubernetes. Also monitors resource changes in kubernetes and brings them back to repository state
- Create a new branch based on master
- Make all the wanted changes in the
CRs
. - If you want to add new component make sure to include it in
links-live.yml
,dictionary-links.yml
,codec-links.yml
(if needed) link files are placed inlinks
directory. - If you are going to have several namespaces together, make sure to assign each component in each namespace with unique
nodePort
. (nodePorts must be unique across the namespaces too)components that requirenodePort
are:rpt-data-provider
,rpt-data-viewer
,act
,check1
. Following ports are reserved by th2-infra:rmq ampq protocol: 32000
,cassandra cql: 32010
,ingress: 30000
. - Make sure that
k8s-propagation
property ininfra-mgr-config.yml
file is set tosync
(only branches that have this property set tosync
orrule
will be deployed by infra manager). - commit all new branch to
git
. (After committing new namespace will be created automatically, it might take 20-40 seconds)
There are two methods to restart the namespace
Repository only method
- set
k8s-propagation
property todeny
ininfra-mgr-config.yml
. Namespace will be deleted by infra manager during 30-60 secs. - set
k8s-propagation
property tosync
orrule
ininfra-mgr-config.yml
. Schema will be deployed by infra manager during 30-60 secs.
Involving kubernetes
- set
k8s-propagation
property ininfra-mgr-config.yml
torule
and commit this change. - delete existing namespace using
kubectl delete namespace NAMESPACE_NAME
command. Schema will be redeployed automatically after 30-60 secs
in order to restart single component just delete pod
of that specific component using kubectl delete pod POD_NAME -n POD_NAMESPACE
command or using kubernetes dashboard (if you have necessary privileges). After deleting, pod
will be recreated automatically.