Skip to content

Commit

Permalink
Add capa-controller-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
enxebre committed Jan 5, 2021
1 parent 2decf38 commit 596b3e3
Show file tree
Hide file tree
Showing 22 changed files with 431 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ tools/bin

config/example-cluster/ssh-key
config/example-cluster/pull-secret
config/example-cluster/aws-creds
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ $ make uninstall
First, create the following files containing secrets used by the example cluster:

- `config/example-cluster/pull-secret` a valid pull secret for image pulls.
- `config/example-cluster/ssh-key` an SSH public key for guest node access
- `config/example-cluster/ssh-key` an SSH public key for guest node access.
- `config/example-cluster/aws-creds` an [aws credentials file](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).

Install the example cluster:

Expand Down
11 changes: 6 additions & 5 deletions api/v1alpha1/hosted_controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ type HostedControlPlane struct {

// HostedControlPlaneSpec defines the desired state of HostedControlPlane
type HostedControlPlaneSpec struct {
ReleaseImage string `json:"releaseImage"`
PullSecret corev1.LocalObjectReference `json:"pullSecret"`
ServiceCIDR string `json:"serviceCIDR"`
PodCIDR string `json:"podCIDR"`
SSHKey corev1.LocalObjectReference `json:"sshKey"`
ReleaseImage string `json:"releaseImage"`
PullSecret corev1.LocalObjectReference `json:"pullSecret"`
ServiceCIDR string `json:"serviceCIDR"`
PodCIDR string `json:"podCIDR"`
SSHKey corev1.LocalObjectReference `json:"sshKey"`
ProviderCreds corev1.LocalObjectReference `json:"providerCreds"`
}

// HostedControlPlaneStatus defines the observed state of HostedControlPlane
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/openshiftcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ type OpenShiftClusterSpec struct {

SSHKey corev1.LocalObjectReference `json:"sshKey"`

ProviderCreds corev1.LocalObjectReference `json:"providerCreds"`

ServiceCIDR string `json:"serviceCIDR"`
PodCIDR string `json:"podCIDR"`
}
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions config/cluster-api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ resources:
- cluster.x-k8s.io_machines.yaml
- cluster.x-k8s.io_machinedeployments.yaml
- cluster.x-k8s.io_machinehealthchecks.yaml
- manager-serviceaccount.yaml
- manager-clusterrole.yaml
- manager-clusterrolebinding.yaml
- manager-deployment.yaml
- infrastructure.cluster.x-k8s.io_awsclusters.yaml
- infrastructure.cluster.x-k8s.io_awsmachinepools.yaml
- infrastructure.cluster.x-k8s.io_awsmachines.yaml
- infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml
- infrastructure.cluster.x-k8s.io_awsmanagedclusters.yaml
- infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml
- manager-serviceaccount.yaml
- manager-clusterrole.yaml
- manager-clusterrolebinding.yaml
- manager-deployment.yaml
4 changes: 2 additions & 2 deletions config/cluster-api/manager-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ rules:
resources:
- hostedcontrolplanes
- hostedcontrolplanes/status
- guestclusters
- guestclusters/status
- externalinfraclusters
- externalinfraclusters/status
verbs:
- '*'
- apiGroups:
Expand Down
1 change: 1 addition & 0 deletions config/cluster-api/manager-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ spec:
- /manager
args:
- --namespace=hypershift
- --alsologtostderr
- --v=4
2 changes: 2 additions & 0 deletions config/example-cluster/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ spec:
name: pull-secret
sshKey:
name: ssh-key
providerCreds:
name: provider-creds
2 changes: 1 addition & 1 deletion config/example-cluster/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ secretGenerator:
files:
- id_rsa.pub=ssh-key
type: Opaque
- name: aws-creds
- name: provider-creds
options:
disableNameSuffixHash: true
files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ spec:
properties:
podCIDR:
type: string
providerCreds:
description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
pullSecret:
description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
properties:
Expand All @@ -59,6 +66,7 @@ spec:
type: object
required:
- podCIDR
- providerCreds
- pullSecret
- releaseImage
- serviceCIDR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ spec:
type: integer
podCIDR:
type: string
providerCreds:
description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
pullSecret:
description: PullSecret is a pull secret injected into the container runtime of guest workers. It should have an ".dockerconfigjson" key containing the pull secret JSON.
properties:
Expand Down Expand Up @@ -68,6 +75,7 @@ spec:
required:
- initialComputeReplicas
- podCIDR
- providerCreds
- pullSecret
- release
- serviceCIDR
Expand Down
94 changes: 94 additions & 0 deletions hypershift-operator/assets/controlplane/hypershift/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 596b3e3

Please sign in to comment.