-
Notifications
You must be signed in to change notification settings - Fork 462
openstack: Add coredns, mdns-publisher and haproxy static pods #740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9fe8641
openstack: Run Coredns, Haproxy, Mdns, Keepalived, and DHCP in static…
af2d105
openstack: Configure Templates to use Baremetal-RuntimeCFG
07f81cc
openstack: Add Wildcard and API records
mandre 0d6e9f2
openstack: Fix the tests
tomassedovic 759702e
openstack: Allow to run MCO changes independently of the installer pa…
mandre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| . { | ||
| errors | ||
| health | ||
| mdns {{ .ControllerConfig.EtcdDiscoveryDomain }} {{`{{.Cluster.MasterAmount}}`}} {{`{{.Cluster.Name}}`}} | ||
| forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}} | ||
| cache 30 | ||
| reload | ||
| hosts /etc/coredns/api-int.hosts {{ .ControllerConfig.EtcdDiscoveryDomain }} { | ||
| {{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP }} api-int.{{ .ControllerConfig.EtcdDiscoveryDomain }} api.{{ .ControllerConfig.EtcdDiscoveryDomain }} | ||
| fallthrough | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| --- | ||
| kind: Pod | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: coredns | ||
| namespace: openshift-kni-infra | ||
| creationTimestamp: | ||
| deletionGracePeriodSeconds: 65 | ||
| labels: | ||
| app: kni-infra-mdns | ||
| spec: | ||
| volumes: | ||
| - name: resource-dir | ||
| hostPath: | ||
| path: "/etc/kubernetes/static-pod-resources/coredns" | ||
| - name: kubeconfig | ||
| hostPath: | ||
| path: "/etc/kubernetes/kubeconfig" | ||
| - name: conf-dir | ||
| empty-dir: {} | ||
| - name: manifests | ||
| hostPath: | ||
| path: "/opt/openshift/manifests" | ||
| initContainers: | ||
| - name: render-config | ||
| image: {{ .Images.BaremetalRuntimeCfgBootstrap }} | ||
| command: | ||
| - runtimecfg | ||
| - render | ||
| - "/etc/kubernetes/kubeconfig" | ||
| - "--api-vip" | ||
| - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP }}" | ||
| - "--dns-vip" | ||
| - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.NodeDNSIP }}" | ||
| - "--ingress-vip" | ||
| - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.IngressIP }}" | ||
| - "/config" | ||
| - "--out-dir" | ||
| - "/etc/coredns" | ||
| - "--cluster-config" | ||
| - "/opt/openshift/manifests/cluster-config.yaml" | ||
| resources: {} | ||
| volumeMounts: | ||
| - name: kubeconfig | ||
| mountPath: "/etc/kubernetes/kubeconfig" | ||
| - name: resource-dir | ||
| mountPath: "/config" | ||
| - name: conf-dir | ||
| mountPath: "/etc/coredns" | ||
| - name: manifests | ||
| mountPath: "/opt/openshift/manifests" | ||
| imagePullPolicy: IfNotPresent | ||
| containers: | ||
| - name: coredns | ||
| securityContext: | ||
| privileged: true | ||
| image: {{ .Images.CorednsBootstrap }} | ||
| args: | ||
| - "--conf" | ||
| - "/etc/coredns/Corefile" | ||
| resources: | ||
| requests: | ||
| cpu: 150m | ||
| memory: 1Gi | ||
| volumeMounts: | ||
| - name: conf-dir | ||
| mountPath: "/etc/coredns" | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /health | ||
| port: 8080 | ||
| scheme: HTTP | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 10 | ||
| successThreshold: 1 | ||
| failureThreshold: 3 | ||
| timeoutSeconds: 10 | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /health | ||
| port: 8080 | ||
| scheme: HTTP | ||
| initialDelaySeconds: 60 | ||
| timeoutSeconds: 5 | ||
| successThreshold: 1 | ||
| failureThreshold: 5 | ||
| terminationMessagePolicy: FallbackToLogsOnError | ||
| hostNetwork: true | ||
| tolerations: | ||
| - operator: Exists | ||
| priorityClassName: system-node-critical | ||
| status: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Configuration template for Keepalived, which is used to manage the DNS and | ||
| # API VIPs. | ||
| # | ||
| # For more information, see installer/data/data/bootstrap/baremetal/README.md | ||
| # in the installer repo. | ||
|
|
||
| vrrp_instance {{`{{.Cluster.Name}}`}}_API { | ||
| state BACKUP | ||
| interface {{`{{.VRRPInterface}}`}} | ||
| virtual_router_id {{`{{.Cluster.APIVirtualRouterID }}`}} | ||
| priority 50 | ||
| advert_int 1 | ||
| authentication { | ||
| auth_type PASS | ||
| auth_pass {{`{{.Cluster.Name}}`}}_api_vip | ||
| } | ||
| virtual_ipaddress { | ||
| {{`{{ .Cluster.APIVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}} | ||
| } | ||
| } | ||
|
|
||
| vrrp_instance {{`{{.Cluster.Name}}`}}_DNS { | ||
| state MASTER | ||
| interface {{`{{.VRRPInterface}}`}} | ||
| virtual_router_id {{`{{.Cluster.DNSVirtualRouterID }}`}} | ||
| priority 140 | ||
| advert_int 1 | ||
| authentication { | ||
| auth_type PASS | ||
| auth_pass {{`{{.Cluster.Name}}`}}_dns_vip | ||
| } | ||
| virtual_ipaddress { | ||
| {{`{{ .Cluster.DNSVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}} | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| kind: Pod | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: keepalived | ||
| namespace: openshift-kni-infra | ||
| creationTimestamp: | ||
| deletionGracePeriodSeconds: 65 | ||
| labels: | ||
| app: kni-infra-vrrp | ||
| spec: | ||
| volumes: | ||
| - name: resource-dir | ||
| hostPath: | ||
| path: "/etc/kubernetes/static-pod-resources/keepalived" | ||
| - name: kubeconfig | ||
| hostPath: | ||
| path: "/etc/kubernetes/kubeconfig" | ||
| - name: conf-dir | ||
| empty-dir: {} | ||
| initContainers: | ||
| - name: render-config | ||
| image: {{ .Images.BaremetalRuntimeCfgBootstrap }} | ||
| command: | ||
| - runtimecfg | ||
| - render | ||
| - "/etc/kubernetes/kubeconfig" | ||
| - "--api-vip" | ||
| - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP }}" | ||
| - "--dns-vip" | ||
| - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.NodeDNSIP }}" | ||
| - "--ingress-vip" | ||
| - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.IngressIP }}" | ||
| - "/config" | ||
| - "--out-dir" | ||
| - "/etc/keepalived" | ||
| resources: {} | ||
| volumeMounts: | ||
| - name: resource-dir | ||
| mountPath: "/config" | ||
| - name: kubeconfig | ||
| mountPath: "/etc/kubernetes/kubeconfig" | ||
| - name: conf-dir | ||
| mountPath: "/etc/keepalived" | ||
| imagePullPolicy: IfNotPresent | ||
| containers: | ||
| - name: keepalived | ||
| securityContext: | ||
| privileged: true | ||
| image: {{ .Images.KeepalivedBootstrap }} | ||
| command: | ||
| - /usr/sbin/keepalived | ||
| args: | ||
| - "-f" | ||
| - "/etc/keepalived/keepalived.conf" | ||
| - "--dont-fork" | ||
| - "--vrrp" | ||
| - "--log-detail" | ||
| - "--log-console" | ||
| resources: | ||
| requests: | ||
| cpu: 150m | ||
| memory: 1Gi | ||
| volumeMounts: | ||
| - name: conf-dir | ||
| mountPath: "/etc/keepalived" | ||
| terminationMessagePolicy: FallbackToLogsOnError | ||
| imagePullPolicy: IfNotPresent | ||
| hostNetwork: true | ||
| tolerations: | ||
| - operator: Exists | ||
| priorityClassName: system-node-critical | ||
| status: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum...so if I understand this correctly, this PR is adding all of the code, and then we need to get the installer PR in first, then we'll do a PR to drop these conditionals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's the intention. The installer PR depends on the changes there, but this PR depends on the changes in the installer PR so this let's us break that cycle.
The conditionals are isolated in a single commit we can revert afterwards.