-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add flag to enable controller cached client #675
Conversation
@jmontleon @rayfordj this failing test seems like a fluke to me, is someone able to interpret why this failed? |
/test operator-e2e |
2 similar comments
/test operator-e2e |
/test operator-e2e |
@alaypatel07 more strange errors... |
same for this. this is very weird, the template does not seem to have problems. |
@@ -71,6 +71,10 @@ spec: | |||
value: webhook-server-secret | |||
- name: MIGRATION_REGISTRY_IMAGE | |||
value: {{ migration_registry_image_fqin }} | |||
{% if mig_controller_enable_cache|bool is true %} |
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.
I think this is the thing that is causing the error here:
TASK [Set up mig controller] ********************************
�[0;31mfatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'template'. Error was a <class 'ansible.errors.AnsibleError'>, original message: template error while templating string: no test named 'true'. String: ---\napiVersion: v1\nkind: Service\nmetadata:\n labels:\n control-plane: controller-manager\n controller-tools.k8s.io: "1.0"\n name: controller-manager-service\n namespace: {{ mig_namespace }}\nspec:\n ports:\n - port: 443\n selector:\n control-plane: controller-manager\n controller-tools.k8s.io: "1.0"\n---\n{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 9 %}\napiVersion: apps/v1beta1\n{% else %}\napiVersion: apps/v1\n{% endif %}\nkind: Deployment\nmetadata:\n labels:\n app: migration\n control-plane: controller-manager\n controller-tools.k8s.io: "1.0"\n app.kubernetes.io/part-of: openshift-migration\n{% if jaeger_enabled|bool %}\n annotations:\n sidecar.jaegertracing.io/inject: "true"\n{% endif %}\n name: migration-controller\n namespace: {{ mig_namespace }}\nspec:\n selector:\n matchLabels:\n app: migration\n control-plane: controller-manager\n controller-tools.k8s.io: "1.0"\n serviceName: controller-manager-service\n template:\n metadata:\n labels:\n app: migration\n control-plane: controller-manager\n app.kubernetes.io/part-of: openshift-migration\n controller-tools.k8s.io: "1.0"\n controller_config_name: {{ controller_config_configmap.env | k8s_config_resource_name }}\n cluster_config_name: {{ cluster_config_configmap.env | k8s_config_resource_name }}\n webhook_secret_name: {{ webhook_secret.env | k8s_config_resource_name }}\n spec:\n serviceAccountName: migration-controller\n containers:\n - command:\n - /manager\n env:\n - name: EXCLUDED_RESOURCES\n value: {{ all_excluded_resources | join(',') }}\n{% if mig_pv_move_storageclasses|length >0 %}\n - name: PV_MOVE_STORAGECLASSES\n value: {{ mig_pv_move_storageclasses | join(',') }}\n{% endif %}\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: ROLE\n value: mtc\n - name: SECRET_NAME\n value: webhook-server-secret\n - name: MIGRATION_REGISTRY_IMAGE\n value: {{ migration_registry_image_fqin }}\n{% if mig_controller_enable_cache|bool is true %}\n - name: ENABLE_CACHED_CLIENT\n value: "true"\n{% endif %}\n{% if http_proxy|length >0 %}\n - name: HTTP_PROXY\n value: {{ http_proxy }}\n{% endif %}\n{% if https_proxy|length >0 %}\n - name: HTTPS_PROXY\n value: {{ https_proxy }}\n{% endif %}\n{% if no_proxy|length >0 %}\n - name: NO_PROXY\n value: {{ no_proxy }}\n{% endif %}\n envFrom:\n - configMapRef:\n name: migration-controller\n image: {{ mig_controller_image_fqin }}\n imagePullPolicy: "{{ image_pull_policy }}"\n name: mtc\n ports:\n - containerPort: 9876\n name: webhook-server\n protocol: TCP\n resources:\n limits:\n cpu: {{ mig_controller_limits_cpu }}\n memory: {{ mig_controller_limits_memory }}\n requests:\n cpu: {{ mig_controller_requests_cpu }}\n memory: {{ mig_controller_requests_memory }}\n volumeMounts:\n - mountPath: /tmp/cert\n name: cert\n readOnly: true\n - command:\n - /manager\n env:\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: ROLE\n value: discovery\n - name: SECRET_NAME\n value: webhook-server-secret\n{% if http_proxy|length >0 %}\n - name: HTTP_PROXY\n value: {{ http_proxy }}\n{% endif %}\n{% if https_proxy|length >0 %}\n - name: HTTPS_PROXY\n value: {{ https_proxy }}\n{% endif %}\n{% if no_proxy|length >0 %}\n - name: NO_PROXY\n value: {{ no_proxy }}\n{% endif %}\n envFrom:\n - configMapRef:\n name: migration-controller\n image: {{ mig_controller_image_fqin }}\n imagePullPolicy: "{{ image_pull_policy }}"\n name: discovery\n ports:\n - name: api\n containerPort: 8080\n name: webhook-server\n protocol: TCP\n resources:\n limits:\n cpu: {{ mig_controller_limits_cpu }}\n memory: {{ mig_controller_limits_memory }}\n requests:\n cpu: {{ mig_controller_requests_cpu }}\n memory: {{ mig_controller_requests_memory }}\n volumeMounts:\n - mountPath: {{ discovery_volume_path }}\n name: discovery\n terminationGracePeriodSeconds: 10\n volumes:\n - name: cert\n secret:\n defaultMode: 420\n secretName: webhook-server-secret\n - name: discovery\n emptyDir: {}\n"}�[0m
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. is true
and is false
are builtin tests that were not added to Jinja2 until 2.11 and the RPM on ubi8 is 2.10.x. You need to use comparison operators like ==
, !=
, etc. to satisfy downstream.
It works upstream because ansible-operator does a pip install
upstream to install. This gets a more current version of Jinja2 than is available via RPM on ubi8.
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.
/retest |
/test operator-e2e |
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.
lgtm
Still not clear why tests continue to give us grief ... 🤷♂️
/retest |
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.
ACK
Resolved conflicts. |
Description
Complement to migtools/mig-controller#1037
Add the switch