Skip to content

Commit

Permalink
feat: update handling vendor charts and add linters (#413)
Browse files Browse the repository at this point in the history
* feat: update handling vendor charts and add linters

* remove makefile tasks

* fix chart path

* use chart-vendor

* set charts path for chart-vendor

depends-on: vexxhost/chart-vendor#1

* eliminate make from gh actions

* fix duplicated patch applies

---------

Co-authored-by: okozachenko1203 <[email protected]>
  • Loading branch information
okozachenko1203 and okozachenko1203 committed Aug 7, 2024
1 parent 761b592 commit 141d536
Show file tree
Hide file tree
Showing 195 changed files with 35,770 additions and 113 deletions.
9 changes: 9 additions & 0 deletions .charts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
charts:
- name: cluster-autoscaler
version: 9.29.1
repository:
url: https://kubernetes.github.io/autoscaler
- name: cilium
version: 1.15.3
repository:
url: https://helm.cilium.io/
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
with:
cache: poetry

- name: Setup poetry
uses: abatilo/actions-poetry@v2

- name: Build package
run: make build
run: poetry build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Build package
if: ${{ steps.release.outputs.release_created }}
run: make build
run: poetry build

- name: Publish package distributions to PyPI
if: ${{ steps.release.outputs.release_created }}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ jobs:
uses: actions/checkout@v3

- name: Install Poetry
run: make poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v4
with:
cache: poetry
python-version: ${{ matrix.python-version }}

- name: Build package
run: make build
run: poetry build

install:
runs-on: ${{ matrix.runs-on }}
Expand All @@ -60,8 +59,11 @@ jobs:
- name: Checkout project
uses: actions/checkout@v3

- name: Checkout project
uses: actions/checkout@v3

- name: Install Poetry
run: make poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v4
Expand All @@ -70,7 +72,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Build package
run: make build
run: poetry build

- name: Install package using constraints
run: pip install --constraint https://releases.openstack.org/constraints/upper/${{ matrix.openstack-version }} ./dist/*.whl
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.direnv
.idea
__pycache__
dist
magnum_cluster_api/charts/vendor/*
site
*.orig
*.rej
15 changes: 1 addition & 14 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
VERSION 0.7

vendir:
FROM github.com/vexxhost/atmosphere/images/curl+image
ARG TARGETOS
ARG TARGETARCH
ARG VERSION=v0.40.0
RUN curl -Lo vendir https://github.com/carvel-dev/vendir/releases/download/${VERSION}/vendir-${TARGETOS}-${TARGETARCH}
RUN chmod +x vendir && ./vendir version
SAVE ARTIFACT vendir

build:
FROM github.com/vexxhost/atmosphere/images/magnum+build
COPY +vendir/vendir /usr/local/bin/vendir
COPY github.com/vexxhost/atmosphere/images/helm+binary/helm /usr/local/bin/helm
COPY --dir magnum_cluster_api/ pyproject.toml README.md vendir.yml /src
COPY --dir magnum_cluster_api/ pyproject.toml README.md /src
WORKDIR /src
RUN vendir sync
COPY hack/add-omt-to-clusterrole.patch /hack/
RUN patch -p0 magnum_cluster_api/charts/vendor/cluster-autoscaler/templates/clusterrole.yaml < /hack/add-omt-to-clusterrole.patch
DO github.com/vexxhost/atmosphere/images/openstack-service+PIP_INSTALL --PACKAGES /src
SAVE ARTIFACT /var/lib/openstack venv

Expand Down
26 changes: 0 additions & 26 deletions Makefile

This file was deleted.

17 changes: 0 additions & 17 deletions hack/add-omt-to-clusterrole.patch

This file was deleted.

6 changes: 0 additions & 6 deletions hack/stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ EOF
# Install CAPI/CAPO
./hack/setup-capo.sh

# Install vendir
./hack/setup-vendir.sh

# Vendor the chart
make vendor

# Install `magnum-cluster-api`
pip install -U setuptools pip python-magnumclient
$HOME/.local/bin/pip3 install -e .
Expand Down
24 changes: 24 additions & 0 deletions magnum_cluster_api/charts/cilium/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.github/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
98 changes: 98 additions & 0 deletions magnum_cluster_api/charts/cilium/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
annotations:
artifacthub.io/crds: "- kind: CiliumNetworkPolicy\n version: v2\n name: ciliumnetworkpolicies.cilium.io\n
\ displayName: Cilium Network Policy\n description: |\n Cilium Network Policies
provide additional functionality beyond what\n is provided by standard Kubernetes
NetworkPolicy such as the ability\n to allow traffic based on FQDNs, or to
filter at Layer 7.\n- kind: CiliumClusterwideNetworkPolicy\n version: v2\n name:
ciliumclusterwidenetworkpolicies.cilium.io\n displayName: Cilium Clusterwide
Network Policy\n description: |\n Cilium Clusterwide Network Policies support
configuring network traffic\n policiies across the entire cluster, including
applying node firewalls.\n- kind: CiliumExternalWorkload\n version: v2\n name:
ciliumexternalworkloads.cilium.io\n displayName: Cilium External Workload\n description:
|\n Cilium External Workload supports configuring the ability for external\n
\ non-Kubernetes workloads to join the cluster.\n- kind: CiliumLocalRedirectPolicy\n
\ version: v2\n name: ciliumlocalredirectpolicies.cilium.io\n displayName: Cilium
Local Redirect Policy\n description: |\n Cilium Local Redirect Policy allows
local redirects to be configured\n within a node to support use cases like
Node-Local DNS or KIAM.\n- kind: CiliumNode\n version: v2\n name: ciliumnodes.cilium.io\n
\ displayName: Cilium Node\n description: |\n Cilium Node represents a node
managed by Cilium. It contains a\n specification to control various node specific
configuration aspects\n and a status section to represent the status of the
node.\n- kind: CiliumIdentity\n version: v2\n name: ciliumidentities.cilium.io\n
\ displayName: Cilium Identity\n description: |\n Cilium Identity allows introspection
into security identities that\n Cilium allocates which identify sets of labels
that are assigned to\n individual endpoints in the cluster.\n- kind: CiliumEndpoint\n
\ version: v2\n name: ciliumendpoints.cilium.io\n displayName: Cilium Endpoint\n
\ description: |\n Cilium Endpoint represents the status of individual pods
or nodes in\n the cluster which are managed by Cilium, including enforcement
status,\n IP addressing and whether the networking is successfully operational.\n-
kind: CiliumEndpointSlice\n version: v2alpha1\n name: ciliumendpointslices.cilium.io\n
\ displayName: Cilium Endpoint Slice\n description: |\n Cilium Endpoint Slice
represents the status of groups of pods or nodes\n in the cluster which are
managed by Cilium, including enforcement status,\n IP addressing and whether
the networking is successfully operational.\n- kind: CiliumEgressGatewayPolicy\n
\ version: v2\n name: ciliumegressgatewaypolicies.cilium.io\n displayName: Cilium
Egress Gateway Policy\n description: |\n Cilium Egress Gateway Policy provides
control over the way that traffic\n leaves the cluster and which source addresses
to use for that traffic.\n- kind: CiliumClusterwideEnvoyConfig\n version: v2\n
\ name: ciliumclusterwideenvoyconfigs.cilium.io\n displayName: Cilium Clusterwide
Envoy Config\n description: |\n Cilium Clusterwide Envoy Config specifies
Envoy resources and K8s service mappings\n to be provisioned into Cilium host
proxy instances in cluster context.\n- kind: CiliumEnvoyConfig\n version: v2\n
\ name: ciliumenvoyconfigs.cilium.io\n displayName: Cilium Envoy Config\n description:
|\n Cilium Envoy Config specifies Envoy resources and K8s service mappings\n
\ to be provisioned into Cilium host proxy instances in namespace context.\n-
kind: CiliumBGPPeeringPolicy\n version: v2alpha1\n name: ciliumbgppeeringpolicies.cilium.io\n
\ displayName: Cilium BGP Peering Policy\n description: |\n Cilium BGP Peering
Policy instructs Cilium to create specific BGP peering\n configurations.\n-
kind: CiliumBGPClusterConfig\n version: v2alpha1\n name: ciliumbgpclusterconfigs.cilium.io\n
\ displayName: Cilium BGP Cluster Config\n description: |\n Cilium BGP Cluster
Config instructs Cilium operator to create specific BGP cluster\n configurations.\n-
kind: CiliumBGPPeerConfig\n version: v2alpha1\n name: ciliumbgppeerconfigs.cilium.io\n
\ displayName: Cilium BGP Peer Config\n description: |\n CiliumBGPPeerConfig
is a common set of BGP peer configurations. It can be referenced \n by multiple
peers from CiliumBGPClusterConfig.\n- kind: CiliumBGPAdvertisement\n version:
v2alpha1\n name: ciliumbgpadvertisements.cilium.io\n displayName: Cilium BGP
Advertisement\n description: |\n CiliumBGPAdvertisement is used to define
source of BGP advertisement as well as BGP attributes \n to be advertised with
those prefixes.\n- kind: CiliumBGPNodeConfig\n version: v2alpha1\n name: ciliumbgpnodeconfigs.cilium.io\n
\ displayName: Cilium BGP Node Config\n description: |\n CiliumBGPNodeConfig
is read only node specific BGP configuration. It is constructed by Cilium operator.\n
\ It will also contain node local BGP state information.\n- kind: CiliumBGPNodeConfigOverride\n
\ version: v2alpha1\n name: ciliumbgpnodeconfigoverrides.cilium.io\n displayName:
Cilium BGP Node Config Override\n description: |\n CiliumBGPNodeConfigOverride
can be used to override node specific BGP configuration.\n- kind: CiliumLoadBalancerIPPool\n
\ version: v2alpha1\n name: ciliumloadbalancerippools.cilium.io\n displayName:
Cilium Load Balancer IP Pool\n description: |\n Defining a Cilium Load Balancer
IP Pool instructs Cilium to assign IPs to LoadBalancer Services.\n- kind: CiliumNodeConfig\n
\ version: v2alpha1\n name: ciliumnodeconfigs.cilium.io\n displayName: Cilium
Node Configuration\n description: |\n CiliumNodeConfig is a list of configuration
key-value pairs. It is applied to\n nodes indicated by a label selector.\n-
kind: CiliumCIDRGroup\n version: v2alpha1\n name: ciliumcidrgroups.cilium.io\n
\ displayName: Cilium CIDR Group\n description: |\n CiliumCIDRGroup is a list
of CIDRs that can be referenced as a single entity from CiliumNetworkPolicies.\n-
kind: CiliumL2AnnouncementPolicy\n version: v2alpha1\n name: ciliuml2announcementpolicies.cilium.io\n
\ displayName: Cilium L2 Announcement Policy\n description: |\n CiliumL2AnnouncementPolicy
is a policy which determines which service IPs will be announced to\n the local
area network, by which nodes, and via which interfaces.\n- kind: CiliumPodIPPool\n
\ version: v2alpha1\n name: ciliumpodippools.cilium.io\n displayName: Cilium
Pod IP Pool\n description: |\n CiliumPodIPPool defines an IP pool that can
be used for pooled IPAM (i.e. the multi-pool IPAM mode).\n"
apiVersion: v2
appVersion: 1.15.3
description: eBPF-based Networking, Security, and Observability
home: https://cilium.io/
icon: https://cdn.jsdelivr.net/gh/cilium/[email protected]/Documentation/images/logo-solo.svg
keywords:
- BPF
- eBPF
- Kubernetes
- Networking
- Security
- Observability
- Troubleshooting
kubeVersion: '>= 1.16.0-0'
name: cilium
sources:
- https://github.com/cilium/cilium
version: 1.15.3
Loading

0 comments on commit 141d536

Please sign in to comment.