Skip to content

Commit

Permalink
Merge pull request #101 from mhjacks/portworx_alternative
Browse files Browse the repository at this point in the history
Candidate for v1.3
  • Loading branch information
mhjacks authored Jan 16, 2024
2 parents 99f8742 + 6fcaae7 commit c373a78
Show file tree
Hide file tree
Showing 41 changed files with 1,939 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- uses: actions/checkout@v4
- uses: actions/checkout@v3

- name: Lint Ansible Playbook
uses: ansible/ansible-lint-action@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ vault.init
/ansible/execution_environment/context/_build/*
pattern-vault.init.bak
super-linter.log
.vscode
9 changes: 9 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@
* Updated wait-for-metal-nodes machinery to also skip RBAC creation since the only reason for it in e-g-v is for the job, which should only be needed when provisioning a separate metal node as is needed by AWS

* Updated common to refresh vault and external-secrets and pick up default features for gitops-1.8

## Changes for v1.3 (October 27, 2023)

* Introduce Portworx Enterprise as an alternative resilient storage solution for the VMs
* Update common for feature/functionality upgrades
* Update default metal node type from c5n.metal to m5.metal to better accommodate different AWS Zones
* Remove support for 4.10 (since it is out of support)
* Update platform level override using new templated valuefile name feature in common
* Skip multicloud gateway (noobaa) installation in ODF by default
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ help:
install upgrade deploy: operator-deploy post-install ## Install or upgrade the pattern via the operator
echo "Installed/Upgraded"

portworx-install portworx-upgrade portworx-deploy: ## Install with portworx instead
EXTRA_HELM_OPTS='-f values-portworx.yaml' make install

post-install: ## Post-install tasks - load-secrets
make load-secrets
echo "Post-deploy complete"
Expand All @@ -27,6 +30,9 @@ test: ## Run tests
make -f common/Makefile PATTERN_OPTS="$(CHART_OPTS)" test
echo Tests SUCCESSFUL

portworx-test:
EXTRA_HELM_OPTS='-f values-portworx.yaml' make test

update-tests: ## Update test results
./scripts/update-tests.sh $(CHART_OPTS)

Expand Down
3 changes: 2 additions & 1 deletion ansible/deploy_kubevirt_worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
node-role.kubernetes.io/worker: ""
machineset_replicas: 1
machineset_user_data_secret: worker-user-data
machineset_user_data_namespace: openshift-machine-api
tasks:
- name: Query Cluster Infrastructure Name
kubernetes.core.k8s_info:
Expand Down Expand Up @@ -109,7 +110,7 @@
tags: {{ machineset_tags }}
userDataSecret:
name: "{{ machineset_user_data_secret }}"
namespace: openshift-machine-api
namespace: "{{ machineset_user_data_namespace }}"
- name: Create MachineSet
kubernetes.core.k8s:
Expand Down
22 changes: 22 additions & 0 deletions charts/hub/aap-config/templates/secret-aws-creds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.awsCreds.inject }}
---
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
name: aws-creds
namespace: ansible-automation-platform
spec:
refreshInterval: 15s
secretStoreRef:
name: {{ .Values.secretStore.name }}
kind: {{ .Values.secretStore.kind }}
target:
name: aws-creds
template:
medatadata:
annotations:
cloudcredential.openshift.io/mode: mint
dataFrom:
- extract:
key: {{ .Values.awsCreds.key }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/hub/aap-config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ rhsm:

kioskExtra:
key: secret/data/hub/kiosk-extra

awsCreds:
inject: false
key: secret/data/hub/aws-creds
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
namespace: {{ .Values.odf.namespace }}
name: ocs-storagecluster
spec:
{{- if not .Values.odf.useMultiCloudGateway }}
multiCloudGateway:
reconcileStrategy: ignore
{{- end }}
resources:
mon:
requests:
Expand Down
2 changes: 2 additions & 0 deletions charts/hub/openshift-data-foundations/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ global:
region: us-east-1

odf:
useMultiCloudGateway: false

jobTerminationGracePeriod: 300
namespace: openshift-storage
mon:
Expand Down
6 changes: 6 additions & 0 deletions charts/hub/portworx/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
description: A Helm chart to configure Portworx Enterprise for OpenShift using Red Hat MultiCloud GitOps
keywords:
- pattern
name: portworx
version: 0.0.1
78 changes: 78 additions & 0 deletions charts/hub/portworx/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{{- define "px.getProductID" -}}
{{- $product := .Values.awsProduct | default "PX-ENTERPRISE" }}
{{- if eq $product "PX-ENTERPRISE-DR" }}
{{- cat "6a97e814-fbe5-4ae3-a3e2-14ca735b5e6b" }}
{{- else }}
{{- cat "3a3fcb1c-7ee5-4f3b-afe3-d293c3f9beb4" }}
{{- end }}
{{- end -}}

{{- define "px.getImage" -}}
{{- $product := .Values.awsProduct | default "PX-ENTERPRISE" }}
{{- if (.Values.customRegistryURL) -}}
{{- if (eq "/" (.Values.customRegistryURL | regexFind "/")) -}}
{{- cat (trim .Values.customRegistryURL) "/px-enterprise:" (trim .Values.versions.enterprise) | replace " " ""}}
{{- else -}}
{{- cat (trim .Values.customRegistryURL) "/px-enterprise:" (trim .Values.versions.enterprise)| replace " " ""}}
{{- end -}}
{{- else -}}
{{- cat "portworx/px-enterprise:" (trim .Values.versions.enterprise) | replace " " ""}}
{{- end -}}
{{- end -}}

{{- define "px.getOCIImage" -}}
{{- $product := .Values.awsProduct | default "PX-ENTERPRISE" }}
{{- if (.Values.customRegistryURL) -}}
{{- if (eq "/" (.Values.customRegistryURL | regexFind "/")) -}}
{{- cat (trim .Values.customRegistryURL) "/oci-monitor:" (trim .Values.versions.ociMon) | replace " " ""}}
{{- else -}}
{{- cat (trim .Values.customRegistryURL) "/oci-monitor:" (trim .Values.versions.ociMon) | replace " " ""}}
{{- end -}}
{{- else -}}
{{- cat "portworx/oci-monitor:" (trim .Values.versions.ociMon) | replace " " ""}}
{{- end -}}
{{- end -}}

{{- define "px.getStorkImage" -}}
{{- $product := .Values.awsProduct | default "PX-ENTERPRISE" }}
{{- if (.Values.customRegistryURL) -}}
{{- if (eq "/" (.Values.customRegistryURL | regexFind "/")) -}}
{{- cat (trim .Values.customRegistryURL) "/stork:" (trim .Values.versions.stork)| replace " " ""}}
{{- else -}}
{{- cat (trim .Values.customRegistryURL) "/stork:" (trim .Values.versions.stork) | replace " " ""}}
{{- end -}}
{{- else -}}
{{- cat "openstorage/stork:" (trim .Values.versions.stork) | replace " " ""}}
{{- end -}}
{{- end -}}

{{- define "px.getAutopilotImage" -}}
{{- $product := .Values.awsProduct | default "PX-ENTERPRISE" }}
{{- if (.Values.customRegistryURL) -}}
{{- if (eq "/" (.Values.customRegistryURL | regexFind "/")) -}}
{{- cat (trim .Values.customRegistryURL) "/autopilot:" (trim .Values.versions.autoPilot) | replace " " ""}}
{{- else -}}
{{- cat (trim .Values.customRegistryURL) "/autopilot:" (trim .Values.versions.autoPilot) | replace " " ""}}
{{- end -}}
{{- else -}}
{{- cat "portworx/autopilot:" (trim .Values.versions.autoPilot) | replace " " ""}}
{{- end -}}
{{- end -}}

{{- define "px.getOperatorImage" -}}
{{- $product := .Values.awsProduct | default "PX-ENTERPRISE" }}
{{- if (.Values.customRegistryURL) -}}
{{- if (eq "/" (.Values.customRegistryURL | regexFind "/")) -}}
{{- cat (trim .Values.customRegistryURL) "/px-operator:" (trim .Values.versions.operator) | replace " " ""}}
{{- else -}}
{{- cat (trim .Values.customRegistryURL) "/px-operator:" (trim .Values.versions.operator) | replace " " ""}}
{{- end -}}
{{- else -}}
{{- cat "portworx/px-operator:" (trim .Values.versions.operator) | replace " " ""}}
{{- end -}}
{{- end -}}

{{- define "px.clusterName" -}}
{{- $fullClusterName := print "px-cluster-" .Values.global.clusterDomain }}
{{- (split "." $fullClusterName)._0 }}
{{- end -}}
Loading

0 comments on commit c373a78

Please sign in to comment.