Skip to content

Instantly share code, notes, and snippets.

@jparrill
Last active December 19, 2022 15:50
Show Gist options
  • Save jparrill/db4235cd4745a2ac58d19b9d63679a30 to your computer and use it in GitHub Desktop.
Save jparrill/db4235cd4745a2ac58d19b9d63679a30 to your computer and use it in GitHub Desktop.
Hypershift Examples
apiVersion: hypershift.openshift.io/v1beta1
kind: HostedCluster
metadata:
creationTimestamp: null
name: sample-hosted
namespace: clusters
spec:
autoscaling: {}
controllerAvailabilityPolicy: SingleReplica
dns:
baseDomain: hc.jpdv.aws.kerbeross.com
privateZoneID: Z00356042DIFBFESRIIVF
publicZoneID: Z07342811SH9AA102K1AC
etcd:
managed:
storage:
persistentVolume:
size: 4Gi
storageClassName: gp3-csi
restoreSnapshotURL: null
type: PersistentVolume
managementType: Managed
fips: false
infraID: sample-hosted-tf7b6
issuerURL: https://sample-hosted-us-west-1.s3.us-west-1.amazonaws.com/sample-hosted-tf7b6
networking:
clusterNetwork:
- cidr: 10.132.0.0/14
machineNetwork:
- cidr: 10.0.0.0/16
networkType: OVNKubernetes
serviceNetwork:
- cidr: 172.31.0.0/16
platform:
aws:
cloudProviderConfig:
subnet:
id: subnet-0a36af1b940d008f1
vpc: vpc-054be2721dcfe04e9
zone: us-west-1b
endpointAccess: Public
region: us-west-1
rolesRef:
controlPlaneOperatorARN: arn:aws:iam::820196288204:role/sample-hosted-tf7b6-control-plane-operator
imageRegistryARN: arn:aws:iam::820196288204:role/sample-hosted-tf7b6-openshift-image-registry
ingressARN: arn:aws:iam::820196288204:role/sample-hosted-tf7b6-openshift-ingress
kubeCloudControllerARN: arn:aws:iam::820196288204:role/sample-hosted-tf7b6-cloud-controller
networkARN: arn:aws:iam::820196288204:role/sample-hosted-tf7b6-cloud-network-config-controller
nodePoolManagementARN: arn:aws:iam::820196288204:role/sample-hosted-tf7b6-node-pool
storageARN: arn:aws:iam::820196288204:role/sample-hosted-tf7b6-aws-ebs-csi-driver-controller
type: AWS
pullSecret:
name: sample-hosted-pull-secret
release:
image: quay.io/openshift-release-dev/ocp-release:4.12.0-rc.1-x86_64
secretEncryption:
aescbc:
activeKey:
name: sample-hosted-etcd-encryption-key
type: aescbc
services:
- service: APIServer
servicePublishingStrategy:
type: LoadBalancer
- service: OAuthServer
servicePublishingStrategy:
type: Route
- service: Konnectivity
servicePublishingStrategy:
type: Route
- service: Ignition
servicePublishingStrategy:
type: Route
- service: OVNSbDb
servicePublishingStrategy:
type: Route
sshKey:
name: sample-hosted-ssh-key
status:
controlPlaneEndpoint:
host: ""
port: 0
apiVersion: v1
kind: ConfigMap
metadata:
name: mc-inplace-test
namespace: clusters
data:
config: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: 99-mc-inplace-test
spec:
config:
ignition:
version: 3.2.0
storage:
files:
- contents:
source: "data:text/plain;charset=utf-8;base64,YWRyb2dhbGxvcAo="
mode: 420
overwrite: true
path: /root/testMachineConfig
apiVersion: hypershift.openshift.io/v1beta1
kind: NodePool
metadata:
name: sample-hosted-us-west-1b
namespace: clusters
spec:
clusterName: sample-hosted
management:
autoRepair: true
upgradeType: InPlace
platform:
aws:
instanceProfile: sample-hosted-tf7b6-worker
instanceType: m5.large
rootVolume:
size: 120
type: gp3
securityGroups:
- id: sg-0a3ade9efe5a503dc
subnet:
id: subnet-0a36af1b940d008f1
type: AWS
release:
image: quay.io/openshift-release-dev/ocp-release:4.12.0-rc.1-x86_64
replicas: 2
status:
replicas: 0
---
apiVersion: hypershift.openshift.io/v1beta1
kind: NodePool
metadata:
name: sample-hosted-us-west-1b
namespace: clusters
spec:
clusterName: sample-hosted
management:
autoRepair: true
upgradeType: Replace
platform:
aws:
instanceProfile: sample-hosted-tf7b6-worker
instanceType: m5.large
rootVolume:
size: 120
type: gp3
securityGroups:
- id: sg-0a3ade9efe5a503dc
subnet:
id: subnet-0a36af1b940d008f1
type: AWS
release:
image: quay.io/openshift-release-dev/ocp-release:4.12.0-rc.1-x86_64
replicas: 2
status:
replicas: 0
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tuned-1
namespace: clusters
data:
tuning: |
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
name: tuned-1
namespace: openshift-cluster-node-tuning-operator
spec:
profile:
- data: |
[main]
summary=Custom OpenShift profile
include=openshift-node
[sysctl]
vm.dirty_ratio="55"
name: tuned-1-profile
recommend:
- priority: 20
profile: tuned-1-profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment