Skip to content

Commit

Permalink
Merge branch 'rackerlabs:main' into heat
Browse files Browse the repository at this point in the history
  • Loading branch information
sowm9802 authored Nov 4, 2024
2 parents 0d7b4af + f1d9b84 commit 89a1b39
Show file tree
Hide file tree
Showing 19 changed files with 674 additions and 39 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/kustomize-cinder-volume-netapp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Kustomize GitHub Actions for cinder-volume-netapp

on:
pull_request:
paths:
- base-kustomize/cinder/netapp/**
- .github/workflows/kustomize-cinder-volume-netapp.yaml
jobs:
kustomize:
name: Kustomize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Kustomize Install
working-directory: /usr/local/bin/
run: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- name: Run Kustomize Build
run: |
kustomize build base-kustomize/cinder/netapp/ > /tmp/rendered.yaml
- name: Return Kustomize Build
uses: actions/upload-artifact@v4
with:
name: kustomize-cinder-volume-netapp-artifact
path: /tmp/rendered.yaml
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ you see a problem, feel free to fix it.
build.
2. Make sure you haven't added any extraneous files to the repository (secrets, .DS_Store, etc.) and
double-check .gitignore if you have a new type of change.
4. Update the README.md / Wiki with details of changes to the interface, this includes new environment
3. Update the README.md / Wiki with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
5. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
4. You may merge the Pull Request in once you have the sign-off of one other developer, or if you
do not have permission to do that, you may request the reviewer to merge it for you.
2 changes: 1 addition & 1 deletion base-helm-configs/cinder/cinder-helm-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ conf:
cinder:
DEFAULT:
storage_availability_zone: az1
default_availability_zone: null
default_availability_zone: az1
allow_availability_zone_fallback: true
scheduler_default_filters: AvailabilityZoneFilter,CapacityFilter,CapabilitiesFilter
volume_usage_audit_period: hour
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ image:
pullPolicy: Always

serviceMonitor:
interval: 3m
scrapeTimeout: 30s
interval: 5m
scrapeTimeout: 90s

nodeSelector:
openstack-control-plane: enabled
Expand Down
2 changes: 1 addition & 1 deletion base-helm-configs/neutron/neutron-helm-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ conf:
# NOTE(portdirect): the bind port should not be defined, and is manipulated
# via the endpoints section.
bind_port: null
default_availability_zones: null
default_availability_zones: az1
network_scheduler_driver: neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler
router_scheduler_driver: neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler
dhcp_load_type: networks
Expand Down
53 changes: 53 additions & 0 deletions base-kustomize/cinder/netapp/configmap-etc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cinder-volume-netapp-config
namespace: openstack
data:
cinder-volume.sh: |
#!/bin/bash
set -ex
exec cinder-volume --config-file /etc/cinder/cinder.conf \
--config-file /tmp/pod-shared/backends.conf \
--config-file /tmp/pod-shared/internal_tenant.conf \
--config-file /tmp/pod-shared/cinder-netapp.conf
generate-backends.py: |
#!/usr/bin/env python3
import configparser
import os
netapp_backends = os.environ.get('NETAPP_BACKENDS')
config = configparser.ConfigParser()
for backend in netapp_backends.split(';'):
backend = backend.split(',')
assert len(backend) == 11
config.add_section(backend[0])
config.set(backend[0], 'netapp_login', backend[1])
config.set(backend[0], 'netapp_password', backend[2])
config.set(backend[0], 'netapp_server_hostname', backend[3])
config.set(backend[0], 'netapp_server_port', backend[4])
config.set(backend[0], 'netapp_storage_family', 'ontap_cluster')
config.set(backend[0], 'netapp_storage_protocol', 'iscsi')
config.set(backend[0], 'netapp_transport_type', 'http')
config.set(backend[0], 'netapp_vserver', backend[5])
config.set(backend[0], 'netapp:qos_policy_group', backend[6])
config.set(backend[0], 'netapp_dedup', backend[7])
config.set(backend[0], 'netapp_compression', backend[8])
config.set(backend[0], 'netapp_thick_provisioned', backend[9])
config.set(backend[0], 'netapp_lun_space_reservation', backend[10])
config.set(backend[0], 'volume_driver', 'cinder.volume.drivers.netapp.common.NetAppDriver')
config.set(backend[0], 'volume_backend_name', backend[0])
print(f'Added backend {backend[0]}')
with open('/tmp/pod-shared/backends.conf', 'w') as configfile:
config.write(configfile)
print('Generated backends.conf')
config = configparser.ConfigParser()
backends = ','.join([i.split(',')[0] for i in netapp_backends.split(';')])
config.set('DEFAULT', 'enabled_backends', backends)
config.set('DEFAULT', 'host', 'cinder-volume-netapp-worker')
with open('/tmp/pod-shared/cinder-netapp.conf', 'w') as configfile:
config.write(configfile)
print('Updated cinder.conf')
ssh_known_hosts: |
# Empty SSH host file managed by cinder-volume-netapp
Loading

0 comments on commit 89a1b39

Please sign in to comment.