Skip to content

Commit

Permalink
cleaner siteconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Oct 21, 2024
1 parent 2ddb8b9 commit e29b95f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 5 additions & 1 deletion scripts/02_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ oc completion bash >>/etc/bash_completion.d/oc_completion

export OCP_RELEASE=$(openshift-install version | head -1 | cut -d' ' -f2)-x86_64
export MINOR=$(echo $OCP_RELEASE | cut -d. -f1,2)
SITE_GENERATE_TAG={{ '4.17' if version in ['dev-preview', 'ci'] else '$MINOR' }}
SITE_GENERATE_TAG=v{{ '4.17' if version in ['dev-preview', 'ci'] else '$MINOR' }}
REDHAT_CREDS=$(cat /root/openshift_pull.json | jq .auths.\"registry.redhat.io\".auth -r | base64 -d)
RHN_USER=$(echo $REDHAT_CREDS | cut -d: -f1)
RHN_PASSWORD=$(echo $REDHAT_CREDS | cut -d: -f2)
podman login -u "$RHN_USER" -p "$RHN_PASSWORD" registry.redhat.io
podman cp $(podman create --name policygentool --rm registry.redhat.io/openshift4/ztp-site-generate-rhel8:$SITE_GENERATE_TAG):/kustomize/plugin/ran.openshift.io ~/.config/kustomize/plugin/
podman rm -f policygentool
2 changes: 1 addition & 1 deletion ztp/scripts/generate_gitops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sleep 120
cd /root/ztp/scripts/gitops
OCP_RELEASE=$(openshift-install version | head -1 | cut -d' ' -f2)-x86_64
export MINOR=$(echo $OCP_RELEASE | cut -d. -f1,2)
export SITE_GENERATE_TAG={{ '4.17' if version in ['dev-preview', 'ci'] else '$MINOR' }}
export SITE_GENERATE_TAG=v{{ '4.17' if version in ['dev-preview', 'ci'] else '$MINOR' }}

{% if dns and disconnected %}
GIT_SERVER=registry.{{ cluster }}.{{ domain }}
Expand Down
2 changes: 1 addition & 1 deletion ztp/scripts/gitops/openshift-gitops-patch.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
],
"terminationMessagePolicy": "File",
"image": "$REGISTRY/openshift4/ztp-site-generate-rhel8:v$SITE_GENERATE_TAG"
"image": "$REGISTRY/openshift4/ztp-site-generate-rhel8:$SITE_GENERATE_TAG"
}
],
"volumeMounts": [
Expand Down
7 changes: 3 additions & 4 deletions ztp/scripts/siteconfig.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
apiVersion: ran.openshift.io/v1
kind: SiteConfig
metadata:
name: example-standard
namespace: example-standard
name: {{ cluster }}
namespace: {{ cluster }}
spec:
baseDomain: {{ spoke_domain or '${DOMAIN}' }}
pullSecretRef:
Expand Down Expand Up @@ -70,11 +70,10 @@ spec:
{% endif %}
- clusterName: {{ spoke_name }}
networkType: {{ spoke_network_type }}
installConfigOverrides: '{"capabilities":{"baselineCapabilitySet": "None", "additionalEnabledCapabilities": ["marketplace", "NodeTuning", "OperatorLifecycleManager", "Ingress"]}}'
installConfigOverrides: '{"capabilities":{"baselineCapabilitySet": "None", "additionalEnabledCapabilities": ["marketplace", "NodeTuning", "Ingress"]}}'
clusterLabels:
common: "true"
logicalGroup: "active"
sites : example-multinode
hardware-type: "hw-type-platform-1"
group-du-sno: ""
provider: "kcli"
Expand Down

0 comments on commit e29b95f

Please sign in to comment.