aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cassandra
AgeCommit message (Collapse)AuthorFilesLines
2021-09-22[COMMON] Enforce checkbashisms tox profileGuillaume Lambert1-1/+1
- add checkbahims to tox.ini default profiles - remove -f options to unforce bashisms detection in explicit bash scripts and to differentiate treatments between bash and sh - migrate #!/bin/bash shebangs to #!/bin/sh for scripts without bashisms The following scripts have not been migrated since they still use bashisms difficult to migrate (mostly arrays - more details below) ./kubernetes/common/mariadb-init/resources/config/db_init.sh ./kubernetes/portal/components/portal-mariadb/resources/config/ \ mariadb/docker-entrypoint.sh ./kubernetes/helm/plugins/deploy/deploy.sh ./kubernetes/helm/plugins/undeploy/undeploy.sh ./kubernetes/sdnc/components/sdnc-prom/resources/bin/ensureSdncActive.sh $ find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f {} + 2>&1\ | grep line | cut -d' ' -f 7- | sort | uniq -c | sort -k1,1nr 18 (bash arrays, ${name[0|*|@]}): 2 (declare): 1 ($FUNCNAME): 1 (shopt): 1 (trap with ERR|DEBUG|RETURN): https://mywiki.wooledge.org/Bashism#Arrays https://mywiki.wooledge.org/Bashism#Special_Variables https://mywiki.wooledge.org/Bashism#Builtins https://www.oilshell.org/release/0.5.alpha2/test/spec.wwz/builtin-trap.html Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Id06ad1d45004321a293bdd26038d8da5f7b6b4ac
2021-09-20[COMMON] Replace tabs by 4 ws in shell scriptsguillaume.lambert1-44/+44
with the following command $ find . -not -path '*/\.*' -name *.sh -exec sed -i 's/\t/ /g' {} + then realign manually what deserves it and in particular, unindent some EOF scripting tags so they do not trigger errors. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Ibfa463ec8083d5a39de18a54d9c1d8746710fe03
2021-08-28[COMMON] Fix ${p^^} bashismsGuillaume Lambert1-2/+2
pointed out by checkbashisms Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: I34d828ac4ab27b5ce6547a20aecc610cdcecf00e
2021-07-20Merge "[COMMON] Fix a docker-entrypoint function name"Krzysztof Opasiak1-4/+4
2021-07-13Merge "[COMMON] Added imagePullSecrets to common template files with some fix"Sylvain Desbureaux1-0/+2
2021-07-13Merge "[OOM] Update Cassandra in common with service account"Sylvain Desbureaux3-0/+10
2021-07-12[COMMON] Added imagePullSecrets to common template files with some fixandreas-geissler1-0/+2
Added the missing definition for imagePullSecrets in the statefulsets.yaml deployment.yaml to support the registryGenerator Issue-ID: OOM-2789 Signed-off-by: andreas-geissler <andreas-geissler@telekom.de> Change-Id: I013ba52c9c49f95cd3d53fcaa9eb084adcbfe662
2021-07-12[OOM] Update Cassandra in common with service accountfarida azmy3-0/+10
Add service account to requirements.yaml, values.yaml and deployment/statefulset Issue-ID: OOM-2703 Signed-off-by: farida azmy <farida.azmy.ext@orange.com> Co-authored-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I226584b16b2cd1c22a4e71eb48ad95d974640006
2021-06-30[CASSANDRA] Don't listen on localhost when on meshSylvain Desbureaux1-8/+0
With istio >= 1.10, cassandra doesn't need anymore to listen on 127.0.0.1. Issue-ID: OOM-2252 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Ib3817f5404a21a96a6fadc76b5cd501b01e9ab25
2021-06-30[COMMON] Fix a docker-entrypoint function nameGuillaume Lambert1-4/+4
pointed out by checkbashisms. Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: I1915d4fcbf38b32180d5a7caa36531ad2fc798a9
2021-06-21Merge "[COMMON] Fix ${!name} bashisms"Sylvain Desbureaux1-2/+5
2021-06-16[COMMON] Fix $BASH_SOURCE and pushd/popd bashismsGuillaume Lambert1-1/+1
pointed out by checkbashisms. Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ic9c4edc0fc6bd94a95bcb85d84379e868fb09930
2021-05-26[COMMON] Fix ${!name} bashismsGuillaume Lambert1-2/+5
pointed out by checkbashisms. Note this kind of indirections can only be replaced directly in POSIX by commands using eval. Security risks must be evaluated for each context where eval is called. For a safe use, the context must ensure that only a limited number of possible constrainted values are passed to eval. https://mywiki.wooledge.org/Bashism#Parameter_Expansions https://mywiki.wooledge.org/BashFAQ/006#Indirection Issue-ID: OOM-264 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Id27f3ffd1ddb092a9c038d3a45d9e3278720eb62
2021-05-17[COMMON] Fix condition bracket bashisms - step 1Guillaume Lambert1-1/+1
pointed out by checkbashisms $ mycmd=$(tox -e checkbashisms | grep '(\[\[ foo \]\] should be \[ foo \])' | sed -e "s@^[^.]*\(.[^ ]*\) line \([0-9]*\) .*@sed -i '\2s/\\\[\\\[\\\( [^]]*\\\)\\\]\\\]/[\\\1]/g' \1;@") $ eval $mycmd plus fix manually quoting hells induced and bash specific regex and multi-conditions Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ie7ca5b71938fae22c200b7fead418618160fbe19
2021-05-07[COMMON][CASSANDRA] Higher PVC Claim for CassandraSylvain Desbureaux1-1/+1
After 3 monthes, usage of Cassandra disk is 8Gi. Moving PVC Claim to 10Gi in order to satisfy this. Issue-ID: OOM-1 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: If8de6fecdbbc49d588e4234a62f91f319531fca4
2021-05-06[COMMON][CASSANDRA] Use Startup probesSylvain Desbureaux2-4/+22
Instead of long initial delay on readiness and liveness probes, use startup probes and be more aggressive on readiness and liveness. Issue-ID: OOM-2741 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: If60f345fd1e11fd1419cee58efb7d53e56dc5c79
2021-04-27Merge "[COMMON] Fix condition equality bashisms"Krzysztof Opasiak1-1/+1
2021-04-16[COMMON] Fix condition equality bashismsGuillaume Lambert1-1/+1
pointed out by checkbashisms. $ mycmd=$(tox -e checkbashisms | grep "(should be 'b = a')" | sed -e "s@^[^.]*\(.[^ ]*\) line \([0-9]*\) .*@sed -i -e '\2s/==/=/g' \1;@") $ eval $mycmd Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: I9032130bc4717e111de11a73187c2f1052376e45
2021-04-14[COMMON] Fix function declarations bashismsGuillaume Lambert1-2/+2
pointed out by checkbashisms. $ mycmd=$(tox -e checkbashisms | grep "^possible .*'function' is useless " | sed -e "s@^[^.]*\(.[^ ]*\) line \([0-9]*\) .*@sed -i -e '\2s/functio n \\\([^ ()]*\\\) *(\\\?)\\\?/\\\1 ()/\' -e '\2s/(){/() {/' \1;@") $ eval $mycmd Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ic41c8ba8288b7a90db9f5775cd601c09ff2ab663
2021-03-24[DOC][COMMON] Prepare Honolulu releaseSylvain Desbureaux2-3/+3
Updating the documentation and bumping version to 8.0.0 Issue-ID: OOM-1 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I6f942f1466fed64264c44fb8fc0e1ffc93a98f18
2021-02-22[GENERIC][CASSANDRA] Loosen probe check timeSylvain Desbureaux1-4/+4
With Azure and also some internal deployments, `nodepool status` takes more than 3 seconds (it can go up to 6 seconds) and so cassandra is not coming up or quite randomly. This patch gives more room to `nodepool status` to answer. Issue-ID: OOM-2687 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I98b0adc751e3cd4fa8710f88567cd8896db548eb
2021-02-10[COMMON][CASSANDRA] Service mesh compatible deploySylvain Desbureaux1-0/+8
In order to make cassandra behaving smoothly on service mesh, we must make it listen to 127.0.0.1 but broadcasting the real IP address. This patch does it. Issue-ID: OOM-2252 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I2c494a987a7d2d72ddce84ac7fab15bcadbc8cf4
2020-11-30[COMMON][DOC] Bump version GuilinSylvain Desbureaux2-3/+3
Update charts and requirements to 7.0.0. Create release notes for Guilin Update documentation Issue-ID: OOM-2638 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I965ed6b6ebb7d74bfddaff73edd3dd55a657841c
2020-11-20[COMMON][CASSANDRA] Uses new tpls for repos / imagesSylvain Desbureaux4-9/+9
This commit makes cassandra template to use the new generator for repositories and images. Also, as cassandra is retrieved from dockerHub, we change the path in order to reflect that. Issue-ID: OOM-2364 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Ibd2c03879035f2bdb83177bba2e4d6f32e108ca7
2020-10-26[COMMON] Add limits to cassandra statefulsets.Sylvain Desbureaux2-14/+11
Having limits is important in order to have safe deployment. cassandra didn't had one so let's add them. Issue-ID: OOM-2230 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Id3fef8c351f1be977eab49abd111304b9edd9151
2020-10-23[COMMON] Fix URL override for cassandra backup cronjobMarat Salakhutdinov1-1/+1
It is not possible to override Cassandra backup cronjob image URL currently. This might cause the problem if non standard repository is used. This patch is fixing that issue. Issue-ID: OOM-2608 Signed-off-by: Marat Salakhutdinov <marat.salakhutdinov@bell.ca> Change-Id: I1eb0a97d1a852d16f8d1662f543c3f583e873a5d
2020-10-14[COMMON] More generic Cassandra backupMarat Salakhutdinov1-3/+3
This patch will fix handling of the backup of cassandra installed with different than "cassandra" common name. Issue-ID: OOM-2596 Signed-off-by: Marat Salakhutdinov <marat.salakhutdinov@bell.ca> Change-Id: Ifff440af79d6626fdbd1c2948795f98aabd167d7
2020-09-15Replace YAML comments with helm comments in templatesJakub Latusek3-0/+6
Change-Id: I8cb12dae07cc3984e7dcfc602afa4c2d07317e9a Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562
2020-09-04[GENERAL] Use readiness container v3.0.1Sylvain Desbureaux2-14/+12
Readiness container v3.x and up are now present in ONAP main repository. They're also not using root user anymore and then script path has changed. Finally, "job_complete" script has been integrated in main "ready" script. As those changes are significant, we must upgrade all the components at once. Depends-On: I5afa83892043f4844afe12e61724a8d368a9f2e0 Issue-ID: OOM-2545 Signed-off-by: Grzegorz Lis <grzegorz.lis@nokia.com> Change-Id: I0b4eb5dd86390273532d67d0a9696e1cfcadf110
2020-07-30Fix cassandra backup.Marat Salakhutdinov3-5/+6
Issue-ID: OOM-2528 Signed-off-by: Marat Salakhutdinov <marat.salakhutdinov@bell.ca> Change-Id: I210cd4bd8e0edf363d37ab7fc4f9f47e018010be
2020-05-08[Tree-wide] Make chart build process predictibleKrzysztof Opasiak1-1/+1
ONAP is built using plain makefile rules. List of targets is generated using wildcard function. Based on make changelog: http://git.savannah.gnu.org/cgit/make.git/tree/NEWS since version 3.82 wildcard is not going to sort its results which means that charts are being processed in an arbitrary order which may lead to build failure due to missing dependencies. Since version 4.3 make started sorting the wildcard results once again which may lead to build issues. To avoid that and make our builds predictible independently from Makefile version let's make sure that we always sort wildcard results. Addinally let's use 'file://' instead of '@local' for charts in common to resolve dependencies between them. Issue-ID: OOM-2399 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: Iacb02dcdbd577ce0e9ca1078dd0586d296ec9375
2020-04-17Add repository for cassandra imageafenner1-1/+1
Change-Id: I287b830f86da0fe0adc440cf9e645f8d244aefe1 Issue-ID: OOM-2368 Signed-off-by: afenner <andrew.fenner@est.tech>
2020-04-02Bump chart versionSylvain Desbureaux2-2/+2
Use 6.0.0 in preparation for Frankfurt release Issue-ID: OOM-2320 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I8ad82dfdf48b56c38c0e85d640b18cc13c8d9e67
2020-02-26Cassandra 3 Upgradeshrek20001-1/+2
Move OOM to use SDC cassandra 3 Issue-ID: SDC-2595 Signed-off-by: shrek2000 <oren.kleks@amdocs.com> Change-Id: Ie58f3420cad70fbed7931656a98951e69a4b7b4b Signed-off-by: shrek2000 <oren.kleks@amdocs.com>
2020-02-04[COMMON] Create templates for services and PVSylvain Desbureaux5-102/+25
Proposition of common templates to make service declaration and PV declaration consistent accross OOM. Propositions of templates for sub parties of resource definitions such as metadatas, selector and containerPorts. I've also made an example with cassandra. Change-Id: I8b8aa8eb61dafba75e89add1979114a0eefce243 Issue-ID: OOM-1971 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
2020-02-03Revert "Make cassandra service mesh compliant"Sylvain Desbureaux1-8/+0
This reverts commit 239bb3e18494584587ee1a6eb482f022b9e32d44. Reason for revert: mandatory template functions not merged yet Issue-ID: OOM-2252 Change-Id: I80444a7103e12aea4568f03ded08e348bba927fb Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
2020-02-02[COMMON] Make cassandra service mesh compliantSylvain Desbureaux1-0/+8
When service mesh is enabled, cassandra needs to listen to `127.0.0.1` instead of POD_IP but must broadcast using POD_IP. Change-Id: If96acd56a092a893f524a69ee83406c9cb70b3e7 Issue-ID: OOM-2252 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
2020-02-01[ONAP-wide] Replace .Release.Name with common.releaseKrzysztof Opasiak7-14/+14
ONAP is too big to be deployed using helm install so we need to use a custom helm plugin helm deploy. This script deloys onap component by component instead of deploying evrything at once. Unfortunately this script also modifies the helm release by appending component name to it. As a result of this behavior our objects are called for example: onap-mariadb-galera-mariadb-galera-0 instead of just being called onap-mariadb-galera-0. This patch simplifies this naming convention by replacing all direct usages of .Release.Name with common.release macro which strips the component specific part from the release name. Issue-ID: OOM-2275 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: Ia8cead50d305adb00eef666d0a1ace74479b5183
2019-12-05[Common] Use global storage templates for PVCSylvain Desbureaux6-103/+59
OOM has now templates in order to create the needed PVC, using: * a PV with a specific class when using a common nfs mount path between nodes (sames as today use) --> is the default behavior today * or a storage class if we want to use dynamic PV. On this case, we use (in order of priority): - persistence.storageClassOverride if set on the chart - global.persistence.storageClass if set globally - persistence.storageClass if set on the chart I've also aligned the PV creation of the different charts. I've also aligned the PVC creation of the different charts. I've removed unused mysql chart and (badly) used nfs-provisioner chart. I've also make cassandra backup work with dynamic PV (but RWX only for now). Change-Id: I0ea3f8c7514ca648d94b6c682684c06b822bbe0a Issue-ID: OOM-2229 Issue-ID: OOM-2228 Issue-ID: OOM-2227 Issue-ID: OOM-1227 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
2019-10-04Increasing Max Heap size to 2GBAkansha Dua1-1/+1
Issue-ID: OOM-2059 Signed-off-by: Akansha Dua <akansha.dua@amdocs.com> Change-Id: I9b8db6ff689c0928ac497b523290e586c0f6f1f8
2019-09-04backup charts for cassandraAkansha Dua7-1/+668
Issue-ID: OOM-2089 Signed-off-by: Akansha Dua <akansha.dua@amdocs.com> Change-Id: Ia1086deda37ba6e613afcc6bd064e7bf4ee692b9
2019-07-11Moving Helm Chart version for El AltoMike Elliott2-2/+2
Updating all helm chart versions to 5.0.0 for the El Alto release. Merge will be co-ordinated with the merge of a separate aai/oom patch. Please do not merge until this coordination has completed. Issue-ID: OOM-1980 Signed-off-by: Mike Elliott <mike.elliott@amdocs.com> Change-Id: I31daaebeacea33565f13affd2fa28fb15fe948ba
2019-06-11cassandra livenessProbe chart errorJoey Sullivan1-1/+1
Disabling cassandra livenessProbe causes the charts generated yaml to append readinessProbe after containerPort because of go ‘-‘ command. Issue-ID: OOM-1922 Signed-off-by: Joey Sullivan <joey.sullivan@amdocs.com> Change-Id: If19c8639d1a5c0968b7156e39945a3ca15dd18b5
2019-05-30Readiness time increased due to errorsTomasz Golabek1-1/+1
Increased readiness time for common cassandra and sdc-cassandra due to installation failures Change-Id: I4c7f6f5db5ddeebb1d3bde50a24e848be75ba867 Issue-ID: SDC-2319 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
2019-05-08Merge "Common Cassandra doesn't support user authentication"Mike Elliott3-1/+114
2019-05-03Common Cassandra doesn't support user authenticationmahendrr3-1/+114
Change-Id: I337aaf258b1a3716d97e31ea3f53014738f3db55 Issue-ID: OOM-1835 Signed-off-by: mahendrr <mahendra.raghuwanshi@amdocs.com>
2019-05-02Bumped version of Casssandra 2.1.7 to 2.2.14Oleg Mitsura1-1/+1
Issue-ID: OOM-1834 this image has newer JDK version, which is not affected by JDK7 issue resolving long hostnames. Change-Id: Ibc94a7b88a24c2e83721e4ee1bab03550b65ffde Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com>
2019-04-30Downgrade Common Cassandra version to 2.1.17 for Dublinmahendrr1-1/+1
Change-Id: I0ae425343937389ff2f9bfd41701402398a63a82 Issue-ID: OOM-1832 Signed-off-by: mahendrr <mahendra.raghuwanshi@amdocs.com>
2019-03-19Shared cassandra cluster snitch changeMahendra Raghuwanshi1-1/+1
Change-Id: Ib7b0e3c0a6a2c81906e3e44e648926e9379da232 Issue-ID: OOM-1733 Signed-off-by: Mahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com>
2019-02-20Instantiate common cassandra clusterMahendra Raghuwanshi5-93/+111
Issue-ID: OOM-1198 Change-Id: Ie49a34cfbe5bdb2620312e8780dccbc0b86a0d6e Signed-off-by: Mahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com>