Browse Source

Remove unused node config

This commit removes unused portions of old node code.
Michael Gugino 6 years ago
parent
commit
fda1df13d9

+ 0 - 10
roles/openshift_node/tasks/config.yml

@@ -23,16 +23,6 @@
     state: directory
   when: ('config' in l2_openshift_node_kubelet_args) | bool
 
-# TODO: add the validate parameter when there is a validation command to run
-- name: Create the Node config
-  template:
-    dest: "{{ openshift.common.config_base }}/node/node-config.yaml"
-    src: node.yaml.v1.j2
-    backup: true
-    owner: root
-    group: root
-    mode: 0600
-
 - name: Configure Node Environment Variables
   lineinfile:
     dest: /etc/sysconfig/{{ openshift_service_type }}-node

+ 0 - 101
roles/openshift_node/tasks/upgrade/bootstrap_changes.yml

@@ -1,101 +0,0 @@
----
-- name: Check for existing node-config.yaml
-  stat:
-    path: "{{ openshift.common.config_base }}/node/node-config.yaml"
-  register: existing_node_config
-
-- name: Copy existing configuration to bootstrap configuration
-  copy:
-    remote_src: true
-    src: "{{ openshift.common.config_base }}/node/node-config.yaml"
-    dest: "{{ openshift.common.config_base }}/node/bootstrap-node-config.yaml"
-    force: no
-    owner: root
-    group: root
-    mode: 0600
-  when: existing_node_config.stat.exists
-
-- name: Find existing credentials
-  find:
-    paths:
-    - "{{ openshift.common.config_base }}/node"
-    patterns:
-    - system*.kubeconfig
-    - node.kubeconfig
-  register: system_kubeconfigs
-
-- name: Copy existing credentials to bootstrap credentials
-  copy:
-    remote_src: true
-    src: "{{ item }}"
-    dest: "{{ openshift.common.config_base }}/node/bootstrap.kubeconfig"
-    force: no
-    owner: root
-    group: root
-    mode: 0600
-  with_items: "{{ system_kubeconfigs.files | default([]) | map(attribute='path') | list }}"
-
-- name: Remove non-bootstrap configuration
-  file:
-    path: "{{ item }}"
-    state: absent
-  with_items:
-  - "{{ openshift.common.config_base }}/node/node.kubeconfig"
-  - "{{ openshift.common.config_base }}/node/node-config.yaml"
-
-- name: Update node-config to prepare for bootstrapping
-  yedit:
-    src: "{{ openshift.common.config_base }}/node/bootstrap-node-config.yaml"
-    edits:
-    - key: servingInfo.certFile
-      value: ""
-    - key: servingInfo.clientCA
-      value: client-ca.crt
-    - key: servingInfo.keyFile
-      value: ""
-    - key: kubeletArguments.bootstrap-kubeconfig
-      value:
-      - "{{ openshift.common.config_base }}/node/bootstrap.kubeconfig"
-    - key: kubeletArguments.rotate-certificates
-      value:
-      - "true"
-    - key: kubeletArguments.cert-dir
-      value:
-      - "{{ openshift.common.config_base }}/node/certificates"
-    - key: kubeletArguments.feature-gates
-      value:
-      - RotateKubeletClientCertificate=true,RotateKubeletServerCertificate=true
-    - key: masterKubeConfig
-      value: node.kubeconfig
-
-- name: Use the admin.kubeconfig for the kubelet bootstrap identity
-  copy:
-    remote_src: true
-    src: "{{ openshift.common.config_base }}/master/admin.kubeconfig"
-    dest: "{{ openshift.common.config_base }}/node/bootstrap.kubeconfig"
-    force: yes
-    owner: root
-    group: root
-    mode: 0600
-  when: inventory_hostname in groups.oo_masters_to_config
-
-- name: Update symlink master CA for docker-registry (name changed)
-  file:
-    src: "{{ item }}"
-    dest: "/etc/docker/certs.d/docker-registry.default.svc:5000/{{ item | basename }}"
-    state: link
-    force: yes
-    follow: no
-  with_items:
-  - "{{ openshift.common.config_base }}/node/client-ca.crt"
-
-- name: Remove previous bootstrap certificates
-  file:
-    path: "{{ openshift.common.config_base }}/node/certificates"
-    state: absent
-
-- name: Update the sysconfig to group "{{ openshift_node_group_name }}"
-  lineinfile:
-    dest: "/etc/sysconfig/{{ openshift_service_type }}-node"
-    line: "BOOTSTRAP_CONFIG_NAME={{ openshift_node_group_name }}"
-    regexp: "^BOOTSTRAP_CONFIG_NAME=.*"

+ 0 - 40
roles/openshift_node/tasks/upgrade/config_changes.yml

@@ -1,11 +1,4 @@
 ---
-- name: Update oreg value
-  yedit:
-    src: "{{ openshift.common.config_base }}/node/node-config.yaml"
-    key: 'imageConfig.format'
-    value: "{{ oreg_url | default(oreg_url_node) }}"
-  when: oreg_url is defined or oreg_url_node is defined
-
 - name: Ensure the node static pod directory exists
   file:
     path: "{{ openshift.common.config_base }}/node/pods"
@@ -25,39 +18,6 @@
     force: yes
     follow: no
 
-- name: Update node-config for static pods
-  yedit:
-    src: "{{ openshift.common.config_base }}/node/node-config.yaml"
-    edits:
-    - key: kubeletArguments.pod-manifest-path
-      value:
-      - "{{ openshift.common.config_base }}/node/pods"
-
-# https://bugzilla.redhat.com/show_bug.cgi?id=1518912
-# - name: Clean up IPAM data
-#   file:
-#     path: "/var/lib/cni/networks/openshift-sdn/"
-#     state: absent
-
-- name: Uninstall openvswitch
-  package:
-    name: openvswitch
-    state: absent
-  when: not openshift_is_atomic | bool
-
-- name: Remove old service information
-  file:
-    path: "{{ item }}"
-    state: absent
-  with_items:
-  - /etc/systemd/system/docker.service.d/docker-sdn-ovs.conf
-  - /etc/systemd/system/atomic-openshift-node-dep.service
-  - /etc/systemd/system/origin-node-dep.service
-  - /etc/systemd/system/openvswitch.service
-
-- name: Move existing credentials and configuration into bootstrap configuration
-  import_tasks: bootstrap_changes.yml
-
 - name: Reset selinux context
   command: restorecon -RF {{ openshift_node_data_dir }}/openshift.local.volumes
   when:

+ 0 - 76
roles/openshift_node/templates/node.yaml.v1.j2

@@ -1,76 +0,0 @@
-allowDisabledDocker: false
-apiVersion: v1
-dnsBindAddress: 127.0.0.1:53
-dnsRecursiveResolvConf: /etc/origin/node/resolv.conf
-dnsDomain: {{ openshift.common.dns_domain }}
-dnsIP: 0.0.0.0
-dockerConfig:
-  execHandlerName: ""
-iptablesSyncPeriod: "{{ openshift_node_iptables_sync_period }}"
-imageConfig:
-  format: {{ oreg_url_node }}
-  latest: {{ openshift_node_image_config_latest }}
-kind: NodeConfig
-kubeletArguments: {{  l2_openshift_node_kubelet_args  | default(None) | lib_utils_to_padded_yaml(level=1) }}
-{% if openshift_is_atomic | bool %}
-  volume-plugin-dir:
-  - "/etc/origin/kubelet-plugins/volume/exec"
-{% endif %}
-{% if openshift_use_crio | bool %}
-  container-runtime:
-  - remote
-  container-runtime-endpoint:
-  - {{ l_crio_var_sock }}
-  image-service-endpoint:
-  - {{ l_crio_var_sock }}
-  runtime-request-timeout:
-  - 10m
-{% endif %}
-{% if openshift_node_use_persistentlocalvolumes | bool %}
-  feature-gates:
-  - PersistentLocalVolumes=true
-  - VolumeScheduling=true
-{% endif %}
-masterClientConnectionOverrides:
-  acceptContentTypes: application/vnd.kubernetes.protobuf,application/json
-  contentType: application/vnd.kubernetes.protobuf
-  burst: 200
-  qps: 100
-masterKubeConfig: system:node:{{ openshift.common.hostname | lower }}.kubeconfig
-networkConfig:
-   mtu: {{ openshift.node.sdn_mtu }}
-{% if openshift_node_use_openshift_sdn | bool or openshift_node_use_nuage | bool or openshift_node_use_contiv | bool or openshift_node_use_kuryr | bool or openshift_node_sdn_network_plugin_name == 'cni' %}
-   networkPluginName: {{ openshift_node_sdn_network_plugin_name }}
-{% endif %}
-{% if openshift_set_node_ip | bool %}
-nodeIP: {{ openshift.common.ip }}
-{% endif %}
-nodeName: {{ openshift.node.nodename }}
-podManifestConfig:
-servingInfo:
-  bindAddress: 0.0.0.0:10250
-  certFile: server.crt
-  clientCA: ca.crt
-  keyFile: server.key
-{% if openshift_node_min_tls_version is defined %}
-  minTLSVersion: {{ openshift_node_min_tls_version }}
-{% endif %}
-{% if openshift_node_cipher_suites is defined %}
-  cipherSuites:
-{% for cipher_suite in openshift_node_cipher_suites %}
-  - {{ cipher_suite }}
-{% endfor %}
-{% endif %}
-volumeDirectory: {{ openshift_node_data_dir }}/openshift.local.volumes
-{% if not (openshift_node_use_kuryr | default(False)) | bool %}
-proxyArguments:
-  proxy-mode:
-     - {{ openshift_node_proxy_mode }}
-{% if openshift_use_calico | default(False) | bool %}
-  cluster-cidr:
-    - {{ osm_cluster_network_cidr }}
-{% endif %}
-{% endif %}
-volumeConfig:
-  localQuota:
-    perFSGroup: {{ openshift_node_local_quota_per_fsgroup }}

+ 0 - 5
roles/openshift_node_group/tasks/bootstrap.yml

@@ -4,8 +4,3 @@
     src: node-config.yaml.j2
     dest: "/etc/origin/node/bootstrap-node-config.yaml"
     mode: 0600
-# Make sure a single master has node-config so that SDN and sync daemonsets requires it
-- name: remove existing node config
-  file:
-    dest: "/etc/origin/node/node-config.yaml"
-    state: absent