github.com/verrazzano/verrazzano@v1.7.1/cluster-operator/controllers/quickcreate/ociocne/template/cluster/ocne.goyaml (about)

     1  # Copyright (c) 2023, Oracle and/or its affiliates.
     2  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  
     4  apiVersion: controlplane.cluster.x-k8s.io/v1alpha1
     5  kind: OCNEControlPlane
     6  metadata:
     7      name:  {{.Name}}-control-plane
     8      namespace: {{.Namespace}}
     9  spec:
    10      verrazzanoPlatformOperator:
    11          enabled: false
    12      moduleOperator:
    13          enabled: true
    14      {{- if .PrivateRegistry }}
    15          image:
    16              repository: {{ .PrivateRegistry.URL }}/verrazzano/module-operator
    17      {{- end }}
    18      {{- if and .PrivateRegistry .PrivateRegistry.CredentialSecret.Name }}
    19          imagePullSecrets:
    20              - name: verrazzano-container-registry
    21      {{- end }}
    22      machineTemplate:
    23          infrastructureRef:
    24              apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
    25              kind: OCIMachineTemplate
    26              name: {{.Name}}-control-plane
    27              namespace: {{.Namespace}}
    28      replicas: {{.OCI.ControlPlane.Replicas}}
    29      version: {{.KubernetesVersion}}
    30      controlPlaneConfig:
    31          imageConfiguration:
    32              dependencies:
    33                  skipInstall: {{.OCNE.Dependencies.SkipInstall}}
    34              {{- if .Proxy }}
    35              proxy:
    36                  httpProxy: {{.Proxy.HTTPProxy}}
    37                  httpsProxy: {{.Proxy.HTTPSProxy}}
    38                  {{- if .Proxy.NoProxy }}
    39                  noProxy: {{.KubernetesBase.ClusterNetwork.ServiceCIDR}},{{.KubernetesBase.ClusterNetwork.PodCIDR}},{{.Proxy.NoProxy}}
    40                  {{- else }}
    41                  noProxy: {{.KubernetesBase.ClusterNetwork.ServiceCIDR}},{{.KubernetesBase.ClusterNetwork.PodCIDR}}
    42                  {{- end }}
    43              {{- end }}
    44          clusterConfiguration:
    45              apiServer:
    46                  certSANs:
    47                      - localhost
    48                      - 127.0.0.1
    49              dns:
    50          {{- if .PrivateRegistry }}
    51                  imageRepository: {{.PrivateRegistry.URL}}/olcne
    52          {{- else }}
    53                  imageRepository: container-registry.oracle.com/olcne
    54          {{- end }}
    55                  imageTag: {{.ContainerImages.CoreDNS}}
    56              etcd:
    57                  local:
    58            {{- if .PrivateRegistry }}
    59                      imageRepository: {{.PrivateRegistry.URL}}/olcne
    60            {{- else }}
    61                      imageRepository: container-registry.oracle.com/olcne
    62            {{- end }}
    63                      imageTag: {{.ContainerImages.ETCD}}
    64              networking: {}
    65              scheduler: {}
    66        {{- if .PrivateRegistry }}
    67              imageRepository: {{.PrivateRegistry.URL}}/olcne
    68        {{- else }}
    69              imageRepository: container-registry.oracle.com/olcne
    70        {{- end }}
    71          initConfiguration:
    72              nodeRegistration:
    73                  criSocket: /var/run/crio/crio.sock
    74                  kubeletExtraArgs:
    75                      cloud-provider: external
    76                      provider-id: {{.ProviderID}}
    77          joinConfiguration:
    78              discovery: {}
    79              nodeRegistration:
    80                  criSocket: /var/run/crio/crio.sock
    81                  kubeletExtraArgs:
    82                      cloud-provider: external
    83                      provider-id: {{.ProviderID}}
    84      {{- if .OCI.CloudInitScript }}
    85          preOCNECommands:
    86      {{- range .OCI.CloudInitScript }}
    87              - {{.}}
    88      {{- end }}
    89      {{- end }}
    90  ---
    91  apiVersion: bootstrap.cluster.x-k8s.io/v1alpha1
    92  kind: OCNEConfigTemplate
    93  metadata:
    94      name:  {{.Name}}
    95      namespace: {{.Namespace}}
    96  spec:
    97      template:
    98          spec:
    99        {{- if .PrivateRegistry }}
   100              clusterConfiguration:
   101                  imageRepository: {{.PrivateRegistry.URL}}/olcne
   102        {{- end }}
   103              imageConfiguration:
   104                  dependencies:
   105                      skipInstall: {{.OCNE.Dependencies.SkipInstall}}
   106                  {{- if .Proxy }}
   107                  proxy:
   108                      httpProxy: {{.Proxy.HTTPProxy}}
   109                      httpsProxy: {{.Proxy.HTTPSProxy}}
   110                      {{- if .Proxy.NoProxy }}
   111                      noProxy: {{.KubernetesBase.ClusterNetwork.ServiceCIDR}},{{.KubernetesBase.ClusterNetwork.PodCIDR}},{{.Proxy.NoProxy}}
   112                      {{- else }}
   113                      noProxy: {{.KubernetesBase.ClusterNetwork.ServiceCIDR}},{{.KubernetesBase.ClusterNetwork.PodCIDR}}
   114                      {{- end }}
   115                  {{- end }}
   116              joinConfiguration:
   117                  nodeRegistration:
   118                      kubeletExtraArgs:
   119                          cloud-provider: external
   120                          provider-id: {{.ProviderID}}
   121          {{- if .OCI.CloudInitScript }}
   122              preOCNECommands:
   123          {{- range .OCI.CloudInitScript }}
   124              - {{.}}
   125          {{- end }}
   126          {{- end }}