80 Commits

Author SHA1 Message Date
Zuul
d90689df7f Merge "Mitigate CVE-2022-4886 and CVE-2023-5044" 2023-11-16 21:55:59 +00:00
Rei Oliveira
462d728eb8 Mitigate CVE-2022-4886 and CVE-2023-5044
This commit adds the flags and config options recommended by the
community in:

https://github.com/kubernetes/ingress-nginx/issues/10570
https://github.com/kubernetes/ingress-nginx/issues/10572

CVE-2023-5044 is mitigated with enableAnnotationValidations
CVE-2022-4886 is mitigated with strict-validate-path-type

Test cases:

PASS: Full build, system install, bootstrap and unlock.
PASS: system application-update to this new version
PASS: Create Ingress resource with special character in path /apple$,
      Verify it's possible to curl localhost/apple$.
      Apply strict-validate-path-type override and verify creating the
      same Ingress object is not possible anymore, neither curl works.
PASS: Create Ingress resource with special characters and verify that
      it creates successfully.

      annotations:

      nginx.ingress.kubernetes.io/permanent-redirect: |
        https://www.google.com$HOST

      Apply enableAnnotationValidations override and verify creating the
      same Ingress object is not possible anymore and a validation error
      is now returned.
PASS: stx-openstack applies without error.

Closes-Bug: 2042977

Change-Id: I2f2279ebb34094d0a21d4440e48ef890f09a6133
Signed-off-by: Rei Oliveira <Reinildes.JoseMateusOliveira@windriver.com>
2023-11-16 17:09:43 -03:00
amantri
556c6a09e2 Enable "allow-snippet-annotations" in ingress-nginx static values
nginx v1.9.0 onwards, "allow-snippet-annotations" is disabled
by default due to security vulnerability reported here
https://github.com/kubernetes/ingress-nginx/issues/7837,
openstack failed to apply due to this change since it is using "configuration-snippet" under annotations in its openstack ingress definition.we are changing this default behavior to let openstack apply
successfully until this upstream PR
https://github.com/kubernetes/ingress-nginx/pull/9742 is addressed.
once we upversion the nginx with the fix, we disable
"allow-snippet-annotations" and openstack team will have to change
their configuration.

Test Cases:
PASS: Enable "allow-snippet-annotations" in nginx configmap
      and apply the openstack app successfully
PASS: Test stx-openstack with installation and verify openstack is
      applied successfully

Closes-bug: 2042957

Change-Id: Ic6c379803f17998ef7f573fa1fffa566b9e74e39
Signed-off-by: amantri <ayyappa.mantri@windriver.com>
2023-11-16 19:23:10 +00:00
amantri
aaac53a74a Upversion nginx app to v1.9.3
Upversioned the nginx app with new images, nginx
controller image to v1.9.3, kube-webhook-certgen to
v20231011-8b53cabe0 and opentelementry to v20230721-3e2062ee5

Test Cases:
PASS: Install system,bootstrap with new images and verify it
      is successful
PASS: Deploy kaurd app by exposing service using nginx ingress
      controller with cert issued by stepca using ACME protocol
PASS: Test snmp app with nginx overrides, try snmpbulkget with
      success with no error on nginx pods
PASS: Test WRO app, upload,apply and deploy WRO without https.
      Verify openstack endpoints and check cli, notice there are
      no errors in the logs.
PASS: Test WRO app with https, install openstack,openstack_ca
      certificate, verify openstack endpoints changed to https
      and verify openstack cli with no errors

Story: 2010705
Task: 48992
Depends-on: https://review.opendev.org/c/starlingx/ansible-playbooks/+/899271

Change-Id: I047b763c529efe482b3f3e90c130ffa56bd01993
Signed-off-by: amantri <ayyappa.mantri@windriver.com>
2023-10-26 11:40:52 -04:00
Zuul
d7ce0cadb5 Merge "Upversion nginx helm chart to 4.5.4 (image 1.7.0)" vf/antelope 2023-05-08 17:24:37 +00:00
Rei Oliveira
118a64a347 Upversion nginx helm chart to 4.5.4 (image 1.7.0)
In addition to staying current with the latest upstream helm-chart,
this version also addresses most of CVE issues reported for v1.1.1.

This version introduces one new image:
registry.k8s.io/ingress-nginx/opentelemetry

One new empty dir pod mount was configured, now for /tmp/nginx.
Because of a change in the docker image where they now store temp files
for nginx in /tmp/nginx dir instead of just /tmp. In stx we need to keep
both mount points, because /tmp is required for the wr-openstack upload
of big images.

Test cases:

PASS: Full build, system install, bootstrap and unlock.
PASS: In a running system update the version with system
      application-update.
PASS: Test the integration with cert-manager by creating certificates
      and https Ingress resources based on an ACME type ClusterIssuer.
PASS: Test the integration with snmp by applying snmp and configuring
      helm overrides to enable the UDP port in nginx. Try snmpbulkget
      command and verify it runs successfully. Verify snmp pod logs
      for successful login and failures.
PASS: Test the integration with wr-openstack by:
      - Apply wro with http only from start and verify it is applied
        successfully.
      - Enable https and verify wro can be re-applied successfully.
      - Apply wro with https enabled from start and verify it is
        applied successfully.
      - Use the openstack cli and verify it works.
      - Try to upload an image (exercises the /tmp dir mount)

Story: 2010705
Task: 47844
Depends-on: https://review.opendev.org/c/starlingx/ansible-playbooks/+/882462

Change-Id: I72e560d4fe8d94064d0c84e0210f47a6dac7fe71
Signed-off-by: Rei Oliveira <Reinildes.JoseMateusOliveira@windriver.com>
2023-05-08 11:28:02 -03:00
Davlet Panech
3a904f2a7c Fix github mirroring for this repo
Updating the rsa ssh host key based on:
https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

Note: In the future, StarlingX should have a zuul job and
secret setup for all repos so we do not need to do this
for every repo.

Needed to rename the secret, because zuul fails if like-named
secrets have diffent values in different branches of the same
repo.

Partial-Bug: #2015246
Change-Id: I1b4995fafe4f998a59233bfe6ecf6772a783bb24
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2023-04-28 12:38:52 -04:00
Rei Oliveira
1d243fe641 Add auto_update to stx application
This commit adds the auto update ability to nginx application.
There are no side effects of enabling this.

Test cases:

PASS: build-pkgs -p stx-nginx-ingress-controller-helm
PASS: build-image
PASS: system application-apply nginx-ingress-controller

Story: 2010628
Task: 47877

Change-Id: I280a5429b1bd34fdb7d7562d7cb11fbe214b4dee
Signed-off-by: Rei Oliveira <Reinildes.JoseMateusOliveira@windriver.com>
2023-04-24 12:54:41 -03:00
Zuul
16b03e380d Merge "Remove armada" 2023-03-27 15:23:11 +00:00
Fabricio Henrique Ramos
c2ae060353 Remove armada
Depends-On: https://review.opendev.org/c/starlingx/config/+/869094

Story: 2010560
Task: 47607

Signed-off-by: Fabricio Henrique Ramos <fabriciohenrique.ramos@windriver.com>
Change-Id: Ib431ee08f9837d59c30c25aa203bedecbebe4370
2023-03-22 14:56:00 +00:00
Zuul
2629a1eae7 Merge "Updated app tarball version" 2023-03-09 17:17:04 +00:00
Manoel Benedito Neto
0321b63654 Update debian packages for pkg-versioning
The Debian packaging meta_data file has been changed to reflect all the
latest git commits under the directory, pointed as usable, and to
improve pkg-versioning addressing the first commit as start point to
build packages.

This ensures that any new code submissions under those
directories will increment the versions.

The commit SHA 4b8dd90cbf was choosen to be the SRC_BASE_SRCREV of the
metadata file for python3-k8sapp-nginx-ingress-controller and
stx-nginx-ingress-controller-helm because is the commit that creates
the debian directory with build files structure for those packages.

Test Plan:
PASS: Verify package versions are updated as expected.
PASS: build-pkgs -c -p python3-k8sapp-nginx-ingress-controller
PASS: build-pkgs -c -p stx-nginx-ingress-controller-helm

Story: 2010550
Task: 47497

Signed-off-by: Manoel Benedito Neto <Manoel.BeneditoNeto@windriver.com>
Change-Id: I1f79fef0304792eb572a866680cca22ea381d392
2023-03-07 21:37:32 +00:00
Manoel Benedito Neto
5d05b376f3 Remove Python 2.7 test triggers from Zuul
This commit removes Python 2.7 jobs from Zuul, since it will no longer
be executed as part of the check and gate steps for nginx ingress
controller repository.

Additionally, this commit updates the package PyYaml to 5.3.1 version
to support oslo-policy 3.5.0 dependency on PyYAML>=5.1. Also, fixes
some lint errors.

Test Plan:
PASS: Verify Zuul check execution and observe the Workflow +1 at the
      end of the proccess.

Story: 2010531
Task: 47566

Signed-off-by: Manoel Benedito Neto <manoel.beneditoneto@windriver.com>
Change-Id: Icefa2545c325872129088ff51ddc193bb1f9e135
2023-03-07 17:41:38 +00:00
Leonardo Fagundes Luz Serrano
2697c87682 Updated app tarball version
Currently, the debian build system produces a debian package version
with the format: "1.0-1.stx.<revision>"

The rules file then parses this deb pkg version at build time
to produce the app tarball version, which always comes up to
be "1.0-1" at this time [1]. This commit changes the app tarball
version calculation so that the resulting tarball version will
be "1.0-<revision>" [2].

This correction is necessary because the application framework
cannot update an app between instances with the same version.

This commit is part of a set of commits updating the app tarball
version calculation to all apps based off of [3].

[1]: /usr/local/share/applications/helm/<APPNAME>-1.0-1.tgz
[2]: /usr/local/share/applications/helm/<APPNAME>-1.0-<N>.tgz

[3]: https://review.opendev.org/c/starlingx/cert-manager-armada-app/+/872628

Test Plan:
pass - build-pkg
pass - tarball version updated

Story: 2010542
Task: 47527

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: If7d6a34817a4670463d977010b5e8e1dde0f122f
2023-03-02 14:46:11 -03:00
Leonardo Fagundes Luz Serrano
e8f64b4a16 Standardize app configs
Fixed versioning and adjusted some build files
to bring them as close to a standard as possible.

- Removed centos files
- Added version tracking via GITREVCOUNT
- Fixed mismatch in plugin name, set to python3-k8sapp-<app>
- Standardized plugin debian files (rules, *.install)
- Plugin wheels saved to /plugin instead of /plugin/<app>

Test Plan:
PASS - Build-pkgs -a
PASS - Build-image
PASS - Install, bootstrap, unlock
PASS - app tarball contains wheel file
PASS - wheel versioning updated properly

Story: 2010542
Task: 47198

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: I1ff25e023777ddec6871b16b1dfac51ad8e5c879
vr/stx.8.0 __v.stx.test2
2023-01-20 15:48:12 +00:00
Al Bailey
ceec5991db Update tox.ini to work with tox 4
This change will allow this repo to pass zuul now
that this has merged:
https://review.opendev.org/c/zuul/zuul-jobs/+/866943

Tox 4 deprecated whitelist_externals.
Replace whitelist_externals with allowlist_externals

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ic23ceb69bc078839c194a629717654bfd3acf002
2022-12-27 00:31:15 +00:00
Leonardo Fagundes Luz Serrano
ab4590edd9 appfwk: set flux reconciliation interval to 1m
Set reconciliation interval for all flux helm resources to 1m
to allow it to manage resources by itself in a reasonable time
interval.

Test Plan (tested as part of [1]):
PASS: bootstrap
PASS: unlocked enabled available
PASS: apps applied
PASS: inspect flux pod logs for errors
PASS: re-test known trigger for 1996747 and 1995748
PASS: re-test known trigger 1997368

[1] https://review.opendev.org/c/starlingx/config/+/866862

Partial-Bug: 1999032

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: Ie7dc9929e74034ec36c48849d317478445efb117
2022-12-07 19:31:18 +00:00
Yue Tao
07c2588977 nginx-ingress-controller-armada-app: update debian_iso_image.inc
Move the packages of "nginx-ingress-controller-armada-app"
from stx-std.lst to debian_iso_image.inc

Test Plan:

Pass: build-pkgs -c -a
Pass: build-image
Pass: boot

Story: 2008862
Task: 46906

Signed-off-by: Yue Tao <yue.tao@windriver.com>
Change-Id: I3fb6fe2094d91a0cbc807eac35db3b61906676ba
2022-11-22 14:07:59 +08:00
Zuul
ec70749e14 Merge "Fix zuul failures during setup" 2022-11-15 12:39:16 +00:00
Sachin Gopala Krishna
dc401f5290 Use control-plane label for nodeSelector and Tolerations
Upstream has deprecated 'node-role.kubernetes.io/master'
to use 'node-role.kubernetes.io/control-plane' in k8s 1.24.

Platform and applications need to be updated to use 'control-plane'
with nodeSelector/Tolerations so we may upgrade from 'master'.

This updates pod nodeSelector to use
'node-role.kubernetes.io/control-plane' instead of
'node-role.kubernetes.io/master'.

This updates pod Tolerations to support both:
- 'node-role.kubernetes.io/master'
- 'node-role.kubernetes.io/control-plane'

Test Plan:
Apply both taints to controller nodes
PASS: Perform all application lifecycle actions:
      upload/apply/remove/delete.
PASS: Ensure that pods are running on the controller nodes.

Story: 2010301
Task: 46675

Signed-off-by: Sachin Gopala Krishna <saching.krishna@windriver.com>
Change-Id: Ie6f951021e0c82310b4a63a095412efc9f6385eb
2022-11-07 05:42:56 -05:00
Al Bailey
cbff42035d Fix zuul failures during setup
The ubuntu-jammy nodeset gets selected by default
and is causing problems during setup.

Collecting cffi>=1.1
Failed to build cffi

ubuntu-focal seem to work fine.
Will specify the nodeset to be focal to resolve this.

Need to update a file that is monitored by zuul
in order to trigger the failing zuul jobs.

In order to not require the legacy pip resolver, the
requirements need to be updated.
The upper constraints are also updated.  When the
debian upper constraints in the build-tools repo are
updated for the appropriate docker and kubernetes, the
file in this repo can set back to empty.

Partial-Bug: 1994843

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ia76846f827e06a7de2908ae123566706b21a589a
2022-11-01 16:54:05 +00:00
Lucas Cavalcante
039ab18be9 Remove nginx-ingress-controller armada app build
As part of Armada deprecation we need to remove all Armada application
builds for all applications that have been migrated to FluxCD.

This patch removes the armada app build from centos and debian.

TEST PLAN:
PASS: Build centos
PASS: Build debian
PASS: rpm package has no armada tarball
PASS: deb package has no armada tarball
PASS: FluxCD package is unchanged

Story: 2009138
Task: 45960

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: Id66f17cc121d7612dfeb48ecdecfdc1a3ad2e404
2022-08-23 14:35:33 -03:00
Zuul
2e8fb28f76 Merge "Fix Nginx Controller Helm plugin name collision" vr/stx.7.0 2022-07-12 18:30:16 +00:00
Lucas Cavalcante
1f419fd653 Fix Nginx Controller Helm plugin name collision
If a Helm plugin from app (X) has the same name as other plugin from a
different app (Y), app plugins from X is not installed as there is a
plugin with the same name already installed. Internally Sysinv
AppOperator has a HashTable and its key is the plugin name, therefore
preventing adding plugins with same name.

We change nginx plugin name so that other apps with different nginx
pĺugins don't collide and prevent the platform from being able to
apply/reapply nginx-platfrom-app

001_ingres-nginx -> 0001_ks-ingress-nginx

Test Plan:
PASS: Apply Nginx together with an app with previous nginx plugin
name
PASS: Name changed at system overrides, command:
system helm-override-show nginx-ingress-controller
nginx-ingress-controller kube-system

Closes-bug: 1980394
Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: I2a1b663d3867873d024c108d71ee074da1a39a5e
2022-07-12 10:47:49 -03:00
Karla Felix
b1a69f2e73 Update Nginx defaultbackend version
Updating Nginx's defaultbackend image version from defaultbackend:1.4 to
defaultbackend-amd64:1.5 to align with the upstream version.

Test Plan:

PASS: Done Helm override to enable defaultbackend and verify
      defaultbackend pod is running after app re-apply.
PASS: Check defaultbackend-amd64:1.5 version pod is using the right
      image version.
PASS: Simple functional test creating ingress resources and
      to test the defaultbackend and nginx with curl commands.
PASS: Fresh install and verified nginx pods are running and
      defaultbackend-amd64:1.5 is the image being used in default
      backend.

Closes-bug: 1980355
Depends-On: https://review.opendev.org/c/starlingx/ansible-playbooks/+/848165
Change-Id: Ie23c811d8788feda563336af9a7c6a638d4ea862
Signed-off-by: Karla Felix <karla.karolinenogueirafelix@windriver.com>
2022-06-30 21:14:48 +00:00
Thiago Brito
c0fe90cec5 Fix nginx version ref for armada
The reference of the stx-nginx-ingress-controller-helm package to
unpack on the centos spec is wrong. If we change the RPM version,
the build fails.

TEST PLAN
PASS build-pkgs stx-nginx-ingress-controller-helm with version changed

Closes-Bug: 1978964
Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: Ibdf432e48a770385209ee689e6d2d91de85336a4
2022-06-16 10:57:46 -03:00
Zuul
5c5f91a088 Merge "Enable application upgrade" 2022-06-13 16:18:52 +00:00
Thiago Brito
99ab7ba8b5 Fix get admission-webhooks w/ 1.23.1
With the upversion of k8s on the platform to 1.23.1, the
kubernetes-client we are using doesn't support getting the
admission-webhooks with the older v1beta1 version. This is a temporary
workaround to get backups working while we evaluate the upversion of the
kubernetes-client library for Stx.8.0.

TEST PLAN
PASS Run backup playbook, no errors

LOGS: https://paste.opendev.org/show/bJaMTRrEBdjwK4XwWm8l/

Closes-Bug: 1978346
Depends-On: https://review.opendev.org/c/starlingx/config/+/845372
Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: Ic57a05d8151a5d498e2422ca53fc0306158d28dc
2022-06-13 15:56:00 +00:00
Robert Church
006d4aa5c0 Enable application upgrade
The helm v3 (FluxCD) release name needs to align with the previous helm
v2 (Armada) release name so that the migrated v2 release (from the helm
2to3 plugin) information allows the helm upgrade to succeed.

Test Plan:
NOTE: Release name change only impacts upgrades so testing only
      performed with CentOS
PASS: Fresh install/provision of AIO-SX
PASS: stx 6.0 -> stx 7.0 app upgrade (upgrade-activation)

Change-Id: Icfd151b50d2bb748be5db1d22cd833bd29fee27f
Story: 2009138
Task: 45610
Signed-off-by: Robert Church <robert.church@windriver.com>
2022-06-12 06:26:14 -04:00
Karla Felix
caa1833350 Remove request of CPU by nginx
Add overrides to remove CPU request by nginx.

Test Plan:

PASS: Check CPU usage request using "kubectl describe node <nodename>"

Closes-Bug: 1977763

Change-Id: Ib54275914da6281edf140c92628aced728f685a1
Signed-off-by: Karla Felix <karla.karolinenogueirafelix@windriver.com>
2022-06-07 13:47:13 +00:00
Zuul
70a6920202 Merge "Adds tmp volume mount to ingress controller" 2022-05-31 11:48:19 +00:00
Thales Elero Cervi
cac8f610db Adds tmp volume mount to ingress controller
When requests that are going through the stx ingress have big body size
the platform docker-lv is temporally increasing its disk usage due to
a request body buffering on the container /tmp directory. Since the tmp
directory is not mounted to any kubernetes volume it is using the
container file system, limited to where containerd is installed [1]

To avoid docker-lv misuse and any related issue it would be interesting
to mount the controller /tmp directory on a kubernetes volume. It would
also be consistent with what is already done on some application
ingresses (e.g. stx-openstack ingress). This way we also keep consistent
documentation for operational procedures (e.g. instructing user on how
much to increase the lv available size for use cases that required huge
request body buffering).

TEST PLAN:
PASS: Build a stx-platform/ingress-nginx chart and apply it to the
system
PASS: Check that the nginx-ingress-controller pod is up and has it /tmp
directory correctly mounted to a kubernetes volume
PASS: Check that requests with body buffering are using the correct
platform kubelet-lv instead of docker-lv (stx-openstack scenario)

[1] https://opendev.org/starlingx/stx-puppet/src/branch/master/puppet-manifests/src/modules/platform/manifests/filesystem.pp#L264

Closes-Bug: 1973212
Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: Ibb53255e3f533900afa2a1921f76f164bacae437
2022-05-27 16:49:47 -03:00
Zuul
054a4b4098 Merge "CentOS: cleanup armada packaging leftovers" 2022-05-27 14:46:36 +00:00
Thiago Brito
329d67175d Debian: Use fluxcd app by default
This commit switches ingress-nginx to use the fluxcd app by default on
Debian and also preserves the armada app on the build for future
tests.

TEST PLAN
PASS Build ISO and install, verify FluxCD is the app loaded

Story: 2009138
Task: 45483

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: I029cf5dc1b68182cfec90dfe8f37fa3000f41577
2022-05-26 16:50:01 -03:00
Thiago Brito
dd5ee4010e CentOS: cleanup armada packaging leftovers
Since on CentOS we are not packaging any armada resources for
nginx-ingress-controller anymore, this commit cleans up the armada
package generation leftovers from the source tree.

TEST PLAN
PASS Removed previous app and tarball
PASS Install new tarball and upload app
PASS Apply app
PASS Check resources created
PASS Debian build

Logs: https://paste.opendev.org/show/bStdjE4JMDpvCnSsQ8MB/

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: I643260ac41d047ea2b58a285eb3ba634c2a2140d
2022-05-25 09:53:42 -03:00
Thiago Brito
989c2c11cd Debian: fluxcd ingress-nginx app
Add the fluxcd app for ingress-nginx to the debian build.

Due to a change on the disposition of folder inside the fluxcd-manifests
folder, this was also checked on CentOS.

TEST PLAN
PASS Install new .deb and install FluxCD nginx
PASS Verify created resources
PASS Install .rpm and test on CentOS
PASS Verify created resources

Logs Debian: https://paste.opendev.org/show/bedUKQSoajNuKua6CGh4/
Logs CentOS: https://paste.opendev.org/show/bkFkgvKlgKopsh3tXTxn/

Story: 2009138
Task: 44473

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: I3e04fcc1ec0a8392dcb0991d8e2a72fd81706ddc
2022-05-20 12:08:47 -03:00
Rei Oliveira
942a4a2647 Add overrides locking versions for nginx images
This commit adds the images and tags for the images used by nginx
in order for the application framework do download them with sysinv
during 'system application-apply'

Test Cases:

PASS: Built application successfully
PASS: Application install successful and pods are Running
PASS: Check that sysinv logs show images being downloaded from
      registry.local

Closes-Bug: 1971981
Depends-on: https://review.opendev.org/c/starlingx/ansible-playbooks/+/841789
Change-Id: I74b7c49ccb4ad87862831cbefcd5a66178b7521a
Signed-off-by: Rei Oliveira <Reinildes.JoseMateusOliveira@windriver.com>
2022-05-16 17:29:47 +00:00
Jerry Sun
35c651d1b5 Rename nginx helm chart
This commit renames the helm charts for the fluxcd application from
nginx-ingress to ingress-nginx. This keeps it consistent with the
armada version, for potential upgrade issues, and allows the ipfamily
overrides to be generated properly. It also adds an override for the
service name to keep it consistent with the armada helm chart, to
avoid any upgrade issues.

Story: 2009138
Task: 44452
Depends-on: https://review.opendev.org/c/starlingx/ansible-playbooks/+/838591
Signed-off-by: Jerry Sun <jerry.sun@windriver.com>
Change-Id: I0e01214fd91387e313719685447624b0ff5fe7f7
2022-05-03 11:39:29 -04:00
Zuul
d9df10820c Merge "Add debian_build_layer.cfg file" 2022-03-31 12:40:20 +00:00
Rei Oliveira
8716a27829 Add helm plugin for nginx 1.1.1 requirement
The new version of nginx helm chart has ipFamily value set to IPv4 as
default. When the cluster is IPv6 the helm chart fails to be installed.
This code is adding a system_override to correctly set the ipFamily
according to the system in order to ensure that it works in both IPv4
and IPv6 environments.

This is also correcting a bad helm chart reference in fluxcd
helmrelease.yaml file.

Test Cases:

PASS: Apply app with system application-apply and check it properly
      generates ipFamily override for that system (IPV4 or IPV6).
PASS: Apply app with system application-apply and check that it
      runs successfully.
PASS: ISO built and installed successfully. Checked that nginx is
      working.
PASS: Verify that the fluxcd app is also running.
PASS: Verify that the fluxcd app version is 1.1.1 and armada version
      is 0.41.2
PASS: Manually copied the helm overrides generated by the helm plugin
      to fluxcd system override and re-installed with success.
PASS: Verify that the app runs successfully in both IPv4 and IPv6
      systems.

Story: 2009138
Task: 44697

Signed-off-by: Rei Oliveira <Reinildes.JoseMateusOliveira@windriver.com>
Change-Id: I2187e5a1457d8417fd6bb6b61322fc2923413fd4
2022-03-09 22:39:57 -03:00
Rei Oliveira
32f023b838 Fixing the debian package for version 0.41.2
The fluxcd version of the app will be added to the debian package in
story 2009138 task 44473.

Test Cases:

PASS: Debian package is built successfully.

Story: 2009836
Task: 44604

Signed-off-by: Rei Oliveira <Reinildes.JoseMateusOliveira@windriver.com>
Change-Id: If591edd61df3129a8447bb415bd38bf31b270ff4
2022-03-01 12:55:01 -03:00
Rei Oliveira
61fe77e3fc Updating fluxcd version of nginx to 1.1.1
This change updates only the fluxcd version of nginx to 1.1.1.
The armada version remains with version 0.41.2 and is also supported.

Test Cases:

PASS: Verify that there are no changes to the armada rpm generated
PASS: Verify that the armada version of app uses nginx 0.41.2
PASS: Run the rpm build and verify that two packages are generated:
      stx-nginx-ingress-controller-helm-<version>.tis.noarch.rpm and
      stx-nginx-ingress-controller-helm-fluxcd-<version>.tis.noarch.rpm
PASS: Install the new package with kustomize and verify that nginx pods
      are deployed and running with success
PASS: Verify that the fluxcd version of the app uses nginx 1.1.1

Story: 2009836
Task: 44604

Change-Id: Icbabe97720eb7d0e8c8676ae2a18ec5afa62b053
Signed-off-by: Rei Oliveira <Reinildes.JoseMateusOliveira@windriver.com>
2022-02-25 14:44:58 -03:00
Mihnea Saracin
6291d8a7f9 Add FluxCD version of the nginx app
Add new manifest files to the nginx app to enable FluxCD support.

The new spec will now generate 2 rpms:
- the original one that contains the armada
  version of the nginx app

- a new one that contains the new FluxCD
  version of nginx app

The FluxCD archive will contain the following:
.
├── charts
│   └── ingress-nginx-3.10.1.tgz
├── checksum.md5
├── fluxcd-manifests
│   ├── base
│   │   ├── helmrepository.yaml
│   │   ├── kustomization.yaml
│   │   └── namespace.yaml
│   ├── kustomization.yaml
│   └── nginx-ingress
│       ├── helmrelease.yaml
│       ├── kustomization.yaml
│       ├── nginx-ingress-static-overrides.yaml
│       └── nginx-ingress-system-overrides.yaml
├── metadata.yaml
└── plugins
    └── k8sapp_nginx_ingress_controller-1.0-py2.py3-none-any.whl

The archive components are almost the same
as the armada components, only the armada manifest file
is replaced with the fluxcd-manifests directory.

Story: 2009138
Task: 44452
Change-Id: Iab30290a8889a2849e65e7b10869e97203a3bd34
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
2022-02-14 15:32:32 +00:00
Zuul
851cdece0c Merge "stx-nginx-ingress-controller-helm: remove dl_hook" 2022-01-06 22:01:23 +00:00
Yue Tao
5bb53b19ac stx-nginx-ingress-controller-helm: remove dl_hook
"src_path" replaces the "${SRC}/files/*" in dl_hook
"src_files" replaces the "${SRC}/manifests/*" in dl_hook
"dl_files" replaces the ${NGINX_PKG} in dl_hook

And move the extracting ${NGINX_PKG} into debian/rules

Story: 2009101
Task: 43746

Signed-off-by: Yue Tao <yue.tao@windriver.com>
Change-Id: I51fb22d81c6cc475eab77f6e54f08248d981f219
2021-12-09 11:30:09 +08:00
Tracey Bogue
3e716e9c61 Debian packaging: Fix manual pycache handling
Fix python-k8sapp-nginx-ingress-controller install file and
clean up manual pycache removal in rules file.

Story: 2009101
Task: 43746

Signed-off-by: Tracey Bogue <tracey.bogue@windriver.com>
Change-Id: I936d3a8fe2f39dac5d87c84a5cc960ff3aed8d10
vr/stx.6.0
2021-12-02 13:32:32 -06:00
Zuul
d2612ce59a Merge "Add Debian packaging for nginx-ic app" 2021-11-08 17:10:25 +00:00
Tracey Bogue
4b8dd90cbf Add Debian packaging for nginx-ic app
Create Debian packages for python-k8sapp-nginx-ingress-controller
and stx-nginx-ingress-controller-helm.

Story: 2009101
Task: 43746

Signed-off-by: Tracey Bogue <tracey.bogue@windriver.com>
Change-Id: If90fa3b18e94bd480d1d5c24636e22825d5f8996
2021-11-03 07:22:20 -05:00
Zuul
c6ecaa5502 Merge "Removing py36 gates from zuul for nginx-ingress-controller-armada-app" 2021-11-02 15:55:55 +00:00
Scott Little
b815bd1023 Add debian_build_layer.cfg file
Story: 2008862

Task: 43154
Signed-off-by: Scott Little <scott.little@windriver.com>
Change-Id: I0d7b6fefcdd46402df1a5354fc7ddd156f2b888f
2021-10-05 14:10:34 -04:00