73 Commits

Author SHA1 Message Date
Egorov, Stanislav
49e55bab46 Fix calico chart for hyperkube 1.12
During bootstrap process kubernetes node is not ready due to missed CNI.
It will be installed later but for a few deployments/jobs it's critical.
They can't start pods and looping in a while.

Workaround is here: add tolerations.

Change-Id: I8b3dacb71a7f102e7f74a6e4b6aee963ef12b8ed
2020-08-11 04:32:31 +00:00
Andrii Ostapenko
824f168efc Undo octal-values restriction together with corresponding code
Unrestrict octal values rule since benefits of file modes readability
exceed possible issues with yaml 1.2 adoption in future k8s versions.
These issues will be addressed when/if they occur.

Also ensure osh-infra is a required project for lint job, that matters
when running job against another project.

Change-Id: Ic5e327cf40c4b09c90738baff56419a6cef132da
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-07-07 15:42:53 +00:00
Andrii Ostapenko
83e27e600c Enable key-duplicates and octal-values yamllint checks
With corresponding code changes.

Change-Id: I11cde8971b3effbb6eb2b69a7d31ecf12140434e
2020-06-17 13:14:30 -05:00
Andrii Ostapenko
dfb32ccf60 Enable yamllint rules for templates
- braces
- brackets
- colons
- commas
- comments
- comments-indentation
- document-start
- hyphens
- indentation

With corresponding code changes.

Also idempotency fix for lint script.

Change-Id: Ibe5281cbb4ad7970e92f3d1f921abb1efc89dc3b
2020-06-17 13:13:53 -05:00
Andrii Ostapenko
8f24a74bc7 Introduces templates linting
This commit rewrites lint job to make template linting available.
Currently yamllint is run in warning mode against all templates
rendered with default values. Duplicates detected and issues will be
addressed in subsequent commits.

Also all y*ml files are added for linting and corresponding code changes
are made. For non-templates warning rules are disabled to improve
readability. Chart and requirements yamls are also modified in the name
of consistency.

Change-Id: Ife6727c5721a00c65902340d95b7edb0a9c77365
2020-06-11 23:29:42 -05:00
Andrii Ostapenko
731a6b4cfa Enable yamllint checks
- document-end
- document-start
- empty-lines
- hyphens
- indentation
- key-duplicates
- new-line-at-end-of-file
- new-lines
- octal-values

with corresponding code adjustment.

Change-Id: I92d6aa20df82aa0fe198f8ccd535cfcaf613f43a
2020-05-29 19:49:05 +00:00
Gage Hugo
d14d826b26 Remove OSH Authors copyright
The current copyright refers to a non-existent group
"openstack helm authors" with often out-of-date references that
are confusing when adding a new file to the repo.

This change removes all references to this copyright by the
non-existent group and any blank lines underneath.

Change-Id: I1882738cf9757c5350a8533876fd37b5920b5235
2020-05-07 02:11:15 +00:00
Pete Birley
641bb04d4a Apparmor: Update to use the runtime default profile
This moves from using the docker profile to the default
runtime profile - which allows container engines other than
docker to work out of the box.

Change-Id: Ica5a48f8c43b90f07969b41e10dc472a772b5b43
Signed-off-by: Pete Birley <pete@port.direct>
2020-01-13 13:04:35 -06:00
Tin Lam
c199addf3c Update apiVersion
This patch set updates and tests the apiVersion for rbac.authorization.k8s.io
from v1beta1 to v1 in preparation for its removal in k8s 1.20.

Change-Id: I4e68db1f75ff72eee55ecec93bd59c68c179c627
Signed-off-by: Tin Lam <tin@irrational.io>
2020-01-09 08:59:48 +00:00
Steve Wilkerson
b50fae62a4 Update kubernetes-entrypoint image reference
This updates the kubernetes-entrypoint image reference to consume
the publicly available kubernetes-entrypoint image that is built
and maintained under the airshipit namespace, as the stackanetes
image is no longer actively maintained

Change-Id: I5bfdc156ae228ab16da57569ac6b05a9a125cb6a
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-10-18 18:20:11 +00:00
caoyuan
040edeb79a Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I0e3af4a3385f5b2a7705bc19b775863b16c2e08e
2019-05-31 01:52:10 +00:00
Pete Birley
eb58abb880 Calico: Fix security context
This PS fixes the use of the security context macros for the
calico chart.

Change-Id: I2ed8a5e994726b625d76a2c308895441c7d174a9
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-21 15:46:16 +00:00
Pete Birley
2abf62ff4d OSH-Infra: Add emptydirs for tmp
This PS adds emptydirs backing the /tmp directory in pods, which
is required in most cases for full operation when using a read only
filesystem backing the container.

Additionally some yaml indent issues are resolved.

Change-Id: I8b7f1614da059783254aa6efc09facf23fca3cad
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-20 20:50:59 +00:00
Rahul Khiyani
4f59603879 Calico-etcd: Add pod/container security context
This updates the Calico-etcd chart to include the pod
security context on the pod template

This also adds the container security context to set
readOnlyRootFilesystem to true

Change-Id: I10ff398d7a552d5287d841ca39c77ea097f7e67e
2019-04-18 12:43:48 +00:00
Goutham Pratapa
d8bc4f0c48 Add Liveness probe to Calico-Kubecontrollers
This commit is to add liveness probe to the
calico kubecontroller containers.

Change-Id: I99e5b0c1e04d94605efa8bfe6863f1f50c2692cd
2019-04-09 22:24:04 +00:00
Chris Wedgwood
f343944f45 [Calico] Using booleans where expected in values (not strings)
The string "false" isn't boolean false.

Where possible use booleans in the values so constructs like:

   {{ if not .Values.some.thing }}
   # some thing is not set
   {{ end }}

work as expected.

In the places it's expanded and passed into the pod environment
variables it is converted to a string; we update those all the same so
that template logic will work.

Change-Id: I6142b9d514b2b21381dbf0de2f1351f5ab94e696
2019-04-04 07:26:58 +00:00
Doug Aaser
200b5e902b Run Calico containers as unprivileged
These changes aim to remove blanket privileges from Calico and replace them
with the default pod privileges granted by Docker plus the few extended
privileges that Calico needs

Change-Id: I1342ef02086877bc69f752403a33278c9670ed86
2019-03-26 16:59:44 +00:00
Steve Wilkerson
84f30ec103 Add release-annotation to pod spec, add missing annotations
This adds the release-annotation to the pod spec for the charts in
openstack-helm-infra. This also adds missing configmap annotations
to charts in openstack-helm-infra

Change-Id: Ie23f0c16a7a21d3929e98928db2bbcef69ae6490
2019-03-21 09:10:48 -05:00
Rahul Khiyani
7520f9b8e7 readOnlyRootFilesystem: true for Calico chart
Fix for adding readOnlyRootFilesystem flag at pod
level

Change-Id: I79fd55e582487ffe91a750a51c7a2c5bed13f777
2019-03-07 15:19:47 +00:00
Steve Wilkerson
7387ecd71c Updated missed daemonsets and deployments to apps/v1
This updates daemonsets and deployments from extensions/v1beta1 to
apps/v1.  These templates were either missed or overlooked when
added, and this change brings them up to the same api version used
for all other daemonsets and deployments

Change-Id: I6d2aba7791ad5eabd23785c01aed01d4f8e53d39
2019-02-19 08:19:45 -06:00
Chris Wedgwood
47a2da5af0 [Calico] Configuration robustness improvements
No longer use networking.settings.ippool.ipip.mode, rather take from
conf.node.CALICO_IPV4POOL_IPIP (this avoids duplication and
possibility of setting them differently).

Logging values previously required Titlecase in some places, lower in
others (and it changed across versions); have the chart DTRT where it
matters to avoid configuration problems.

Change-Id: Idb7ccb5be8f9e1cb184ed86a9fd0875704912564
2019-01-30 06:33:22 +00:00
Dmitrii Kabanov
0c5e2c4830 [Calico] Update TLS settings for Calico
PS provides possibility to use TLS in etcd (for Calico).
The ansible scripts were updated as well.

Change-Id: I522a78043a125660153aaa60f13d61ba8e325e75
2019-01-18 19:53:46 +00:00
Michael Beaver
e34270c51e Basic support for BGP communities in calico
This creates a new section in calico/values.yaml that enables
BGP communities to be applied to a cidr by using the bird_ipam
templates.

Change-Id: I4dbbc8d8e761e0484eeb7c8bf0fefa28d29493e5
2019-01-10 14:02:16 -06:00
Chris Wedgwood
016eba093c [Calico] Update comment URL references
Update the comment URL references to v3.4 to match the code; other
than ipPool (which was extended) the previous objects versions match
the current version.

Change-Id: I1dae92c99992e3a808bea2c270b9d6070274e9f6
2019-01-08 06:25:58 +00:00
Chris Wedgwood
0c4e37391f 'NOP' cleanup for more consistent white-space use in charts
Where we have the style '{{ ...' we should use the style '... }}'.

Change-Id: Ic3e779e4681370d396f95d3804ca27db5b9d3642
2019-01-03 22:45:49 +00:00
Chris Wedgwood
239cc91f7a [Calico] Update to v3.4.0
Calico v3.4.0 update.

Notable features upstream:

 * Advertising Kubernetes Service ClusterIPs
   https://docs.projectcalico.org/master/usage/service-advertisement

 * Host * endpoints (wildcard interfaceName)
   https://docs.projectcalico.org/v3.4/reference/calicoctl/resources/hostendpoint

Change-Id: Iaebfcae08d622b75005e4e6df55e9eac34317cc2
2018-12-30 06:17:05 +00:00
Chris Wedgwood
49604fbd17 [Calico] Update to v3.3.2
Calico v3.3.2 update with:

 * update container images
 * update configuration
   * expose  ipPool blockSize
 * update bird templates
 * update rbac

Change-Id: I72d218cb55a70b72c4d7d940109e718fe44a094f
2018-12-30 06:15:50 +00:00
Zuul
13a58c5530 Merge "[Calico] Update to v3.2.4" 2018-12-27 20:07:16 +00:00
Scott Hussey
048b18a50f (calico) Add network policy safety valve
- If a rule set in the network policy override for the calico
  chart is empty, it causes the calico-settings job to fail. This
  safety valve should handle the empty list gracefully.

Change-Id: I4b8a39941f05a8eb86734ff129b2d73830883236
2018-12-20 11:02:32 -06:00
Chris Wedgwood
41508d39e2 [Calico] Update to v3.2.4
Upstream container updates only, no chart changes required.

Change-Id: I3cdc6f23269a5beac231575ac1b5faf654e424b7
2018-12-19 17:18:32 +00:00
Chris Wedgwood
3f79066797 [Calico] Logging fixes/updates
Expose the early logging level for calico-node.

Use conf.node.FELIX_LOGSEVERITYSCREEN to set logging level in
BGPConfiguration and FelixConfiguration (whilst this is an odd
name/location it backwards compatible and will in most cases set
things as expected).

Change-Id: I70c3028423eddb4721456f645c4475da4af7ced5
2018-12-16 07:21:31 +00:00
Aaron Sheffield
8b201ea0eb Adding AppArmor profile to Calico v3
- Adds AppArmor profile to the privileged pod
  using kubernetes_manadatory_access_control_annotation.
- Added apparmor install to the gate jobs.

Change-Id: I8b53e0b8ddc2695fa278481edf5688efa23ab06b
2018-12-10 16:23:35 +00:00
Chris Wedgwood
02f400e442 [Calico] Allow resource configuration using chart (overrides)
Allow Calico resources such as NetworkPolicy, GlobalNetworkPolicy,
WorkloadEndpoint, etc to be specified using values.

To avoid the complexities of list management with helm we use a
dictionary that contains a relative priority and set of objects
(called rules).

For example:

network:
  policy:

    someName:
      priority: 0
      rules:
       - apiVersion: projectcalico.org/v3
... some useful resource object ...
       - apiVersion: projectcalico.org/v3
... some other useful resource object ...

    someOtherName:
      priority: 1
      rules:
       - apiVersion: projectcalico.org/v3
... rules that come later ...

    lastSetOfRules:
      priority: 9
      rules:
       - apiVersion: projectcalico.org/v3
... rules that come last ... maybe hostendpoints ...

By having named groups of rules each with it's own priority you can
update, delete and amend individual sets of rules without provided you
set the appropriate "priority" value.

Change-Id: Id441350bcc8b95a91ef4d1b89d1bc3c417f50b13
2018-10-22 18:49:18 +00:00
Chris Wedgwood
1e82ab4c45 [Calico] Update to v3.2.3
Update everything to v3.2.3 consistently.

Change-Id: I4728faeec1572e6d4921f5118a9baee1cd7422ed
2018-10-06 05:41:29 +00:00
Chris Wedgwood
26e1b9cde6 [Calico] Update to Calico v3.2
Change-Id: I2214fea8d8c1563b08c4015c9e91a29cf071af5a
2018-10-05 01:49:42 +00:00
Chris Wedgwood
45275ffefd [Calico] Realign Calico v2 chart for upcoming v3.2 upgrade
This PS realigns Calico v2 with the pending Calico v3.2 chart in order
to minimize differences.  It's mostly refactoring with a few small fixes.

Change-Id: Ie5157b4ae324b6eb4c8ccb5cc07d8b9bc5a83ebd
2018-10-03 03:38:25 +00:00
Pete Birley
bb3ff98d53 Add release uuid to pods and rc objects
This PS adds the ability to attach a release uuid to pods and rc
objects as desired. A follow up ps will add the ability to add arbitary
annotations to the same objects.

Change-Id: Iceedba457a03387f6fc44eb763a00fd57f9d84a5
Signed-off-by: Pete Birley <pete@port.direct>
2018-09-13 05:35:35 +00:00
Jean-Philippe Evrard
bf069b2311 Revert "Update OSH Author copyrights to OSF"
This reverts commit 178aa271a44956e86f4e962bf815fa827d93c9af.

Change-Id: I38a52d866527dfff2689b618e055f439bc248c13
2018-08-28 17:25:54 +00:00
Matt McEuen
178aa271a4 Update OSH Author copyrights to OSF
This PS updates the "Openstack-Helm Authors" copyright attribution
to be the "OpenStack Foundation", as decided in the 2018-03-20
team meeting:
http://eavesdrop.openstack.org/meetings/openstack_helm/2018/openstack_helm.2018-03-20-15.00.log.html

No other copyright attributions were changed.

Change-Id: I1137dee2ae5728771835f4b33fcaff60fcc22ca9
2018-08-26 17:17:06 -05:00
Matt McEuen
99f405aa03 Remove obsolete calico version notes
This removes some obsolete calico version information that
was leftover from the original manifest after which this chart
was modeled.

Change-Id: Ic592923484c498216025bb5a7b0bda1f2be9e871
2018-07-10 01:58:57 +00:00
Pete Birley
abb00e97fd Gotpl: remove quote and trunc to suppress output
This PS removes the use of the `quote and truncate` approach to
suppress output from gotpl actions in templates and replaces it
with the recommended practice of defining `$_` instead.

Change-Id: I5fedc3471dcbecef37d2fe1302bf9760b3163467
Signed-off-by: Pete Birley <pete@port.direct>
2018-06-16 16:37:08 -05:00
Pete Birley
fa629cdbbd Daemonsets: Use current kubernetes daemonset api version
This PS moves to use the current ga version for kubernetes daemonsets,
additionally any remaining deployments that were using the
`extensions/v1beta1` have been updated to `apps/v1`.

Story: 2002205
Task: 21735

Change-Id: If9703162dc472af1e6096bf2b9062802fd5ce8ab
Signed-off-by: Pete Birley <pete@port.direct>
2018-06-13 21:53:18 +00:00
Chris Wedgwood
d0f13ceb47 calico: upgrade to release 2.6.9, update etcd
* upgrade to calico 2.6.9 compontents
 * bump etcd minor version

Change-Id: If62a687a12b411e4e81de5d0da5792e55bd1769c
2018-05-08 17:36:32 +00:00
Zuul
158b07037c Merge "calico: yaml indentation fixes" 2018-04-28 17:41:38 +00:00
Sean Eagan
f402171e42 Move to v0.3.1 of kubernetes-entrypoint
Move to v0.3.1 of kubernetes-entrypoint which has 2 breaking changes to
pod dependencies, and also adds support for depending on jobs via
labels.

Change-Id: I2bafc2153ddd46b3833b253a2e7950bccbccf8ed
2018-04-25 12:38:44 -05:00
Steve Wilkerson
e166432a98 Add manifest for image_repo_sync job
This ps proposes adding a common template for the image_repo_sync
jobs for consumption by the charts

Change-Id: I48476d1e4fd94bd1b08b13b46983e3d999f8d8ca
2018-04-19 14:10:08 +00:00
Steve Wilkerson
aaffc4caf0 OSH-Infra: Update labels for chart components
This ps adds more granular node selectors for the charts in osh
infra to match what is currently done in osh

Change-Id: I8957a95053b9fb3ea329fd37ff049cd223a7695d
2018-04-13 08:44:33 -05:00
Pete Birley
b9336ca613 Helm-Toolkit: Kubernetes Entrypoint, simplify image dependencies
This PS simplify the logic for dyanmicly merging the image management
depenencies into pod deps when active.

Change-Id: I0cf6c93173bc5fbce697ac15be8697d3b1326d0a
2018-04-13 08:42:37 -05:00
Chris Wedgwood
aa916870bd calico: yaml indentation fixes
Change-Id: I4e58e1626c059247928167c9e45c44a49e26bd8d
2018-04-11 21:44:12 +00:00
Steve Wilkerson
fbfc7bca40 Calico: Remove duplicate calico_cni image tag
This removes a duplicate calico_cni image tag from the calico
chart in osh-infra

Change-Id: I702796cf43ead9c10558a76bf4c23e133b0e8228
2018-04-03 12:37:12 -05:00