Commit Graph

84 Commits

Author SHA1 Message Date
Vladimir Kozhukalov 4eed2c3486 Remove calico chart
Tigera provides tools for managing Calico deployments (helm chart,
operator and even plain kubectl manifest). Also there are plenty of
other networking solutions on the market and it looks like users can choose
on their own the CNI implementation.

There have not been many contributions to this chart for quite some time
and we don't use this chart in any test jobs. In the deploy-env role we use
the upstream Calico manifest.

Change-Id: I6005e85946888c52e0d273c61d38f4787e43c20a
2024-02-05 15:17:13 -08:00
Samuel Liu 0053fc5737 replace scheduler.alpha.kubernetes.io/critical-pod with priorityClassName
this feature was deprecated in 1.13. Now it`s not work.[1]

"scheduler.alpha.kubernetes.io/critical-pod annotation is removed. Pod priority (spec.priorityClassName) should be used instead to mark pods as critical. Action required!"[2]

[1]https://github.com/kubernetes/kubernetes/issues/79548
[2]https://github.com/kubernetes/kubernetes/pull/79554

Change-Id: I5913030634fe3f53b11ddb9bbe40d665f45a1254
2023-06-06 10:53:59 +08:00
Anselme, Schubert (sa246v) e74e94a19a
Update calico to v3.25.1
Change-Id: I1c475266584316d550924fa53badf43463f4d0bd
Signed-off-by: Anselme, Schubert (sa246v) <sa246v@att.com>
2023-05-23 15:13:30 +00:00
Samuel Liu 6034a00bf7 Replace node-role.kubernetes.io/master with control-plane
The master label is no longer present on kubeadm control plane nodes(v1.24). For new clusters, the label 'node-role.kubernetes.io/master' will no longer be added to control plane nodes, only the label 'node-role.kubernetes.io/control-plane' will be added. For more information, refer to KEP-2067[https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint]: Rename the kubeadm "master" label and taint.

the kubernetes pr: https://github.com/kubernetes/kubernetes/pull/107533

Change-Id: I3056b642db0a1799089998e3c020b4203c9a93ab
2023-03-20 13:38:07 +08:00
Brian Haley f31cfb2ef9 support image registries with authentication
Based on spec in openstack-helm repo,
support-OCI-image-registry-with-authentication-turned-on.rst

Each Helm chart can configure an OCI image registry and
credentials to use. A Kubernetes secret is then created with these
info. Service Accounts then specify an imagePullSecret specifying
the Secret with creds for the registry. Then any pod using one
of these ServiceAccounts may pull images from an authenticated
container registry.

Change-Id: Iebda4c7a861aa13db921328776b20c14ba346269
2022-07-20 14:28:47 -05:00
Gage Hugo 22e50a5569 Update htk requirements
This change updates the helm-toolkit path in each chart as part
of the move to helm v3. This is due to a lack of helm serve.

Change-Id: I011e282616bf0b5a5c72c1db185c70d8c721695e
2021-10-06 01:02:28 +00:00
Sean Eagan b1a247e7f5 Helm 3 - Fix Job labels
If labels are not specified on a Job, kubernetes defaults them
to include the labels of their underlying Pod template. Helm 3
injects metadata into all resources [0] including a
`app.kubernetes.io/managed-by: Helm` label. Thus when kubernetes
sees a Job's labels they are no longer empty and thus do not get
defaulted to the underlying Pod template's labels. This is a
problem since Job labels are depended on by
- Armada pre-upgrade delete hooks
- Armada wait logic configurations
- kubernetes-entrypoint dependencies

Thus for each Job template this adds labels matching the
underlying Pod template to retain the same labels that were
present with Helm 2.

[0]: https://github.com/helm/helm/pull/7649

Change-Id: I3b6b25fcc6a1af4d56f3e2b335615074e2f04b6d
2021-09-30 16:01:31 -05:00
Thiago Brito 5a0ba49d50 Prepending library/ to docker official images
This will ease mirroring capabilities for the docker official images.

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: I0f9177b0b83e4fad599ae0c3f3820202bf1d450d
2021-06-02 15:04:38 -03:00
Andrii Ostapenko 1532958c80
Change helm-toolkit dependency version to ">= 0.1.0"
Since we introduced chart version check in gates, requirements are not
satisfied with strict check of 0.1.0

Change-Id: I15950b735b4f8566bc0018fe4f4ea9ba729235fc
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-09-24 12:19:28 -05:00
Mohammed Naser c7a45f166f Run chart-testing on all charts
Added chart lint in zuul CI to enhance the stability for charts.
Fixed some lint errors in the current charts.

Change-Id: I9df4024c7ccf8b3510e665fc07ba0f38871fcbdb
2020-09-11 18:02:38 +03:00
diwakar thyagaraj ffb4781445 Upgrade etcd to 3.4.3
Change-Id: I6a9e225c1acb3f7cfeadd601fa4f2abb37e133f3
Signed-off-by: diwakar thyagaraj <diwakar.chitoor.thyagaraj@att.com>
2020-09-09 16:29:02 +00:00
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 178aa271a4.

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