Skip to content

OpenShift v1 Deployment Config not idempotent #130

@chouseknecht

Description

@chouseknecht

Testing my new k8s module, using the openshift client, I'm running into the following differences when submitting a Deployment Config multiple times:

        "differences": [
            [
                "change",
                [
                    "spec",
                    "template",
                    "spec",
                    "containers",
                    0,
                    "volume_mounts",
                    0,
                    "read_only"
                ],
                [
                    null,
                    false
                ]
            ],
            [
                "change",
                [
                    "spec",
                    "template",
                    "spec",
                    "containers",
                    0,
                    "security_context"
                ],
                [
                    null,
                    {
                        "capabilities": null,
                        "privileged": null,
                        "read_only_root_filesystem": null,
                        "run_as_non_root": null,
                        "run_as_user": null,
                        "se_linux_options": null
                    }
                ]
            ]

Here's the Deployment Config I'm sending:

           "kind": "DeploymentConfig",
            "metadata": {
                "labels": {
                    "app": "galaxy",
                    "service": "elastic"
                },
                "name": "elastic",
                "namespace": "testing"
            },
            "spec": {
                "replicas": 0,
                "strategy": {
                    "type": "Rolling"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "app": "galaxy",
                            "service": "elastic"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "command": [
                                    "elasticsearch"
                                ],
                                "image": "ansible/galaxy-elasticsearch:2.4.6",
                                "name": "elastic",
                                "state": "present",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/usr/share/elasticsearch/data",
                                        "name": "elastic-volume"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "elastic-volume",
                                "persistentVolumeClaim": {
                                    "claimName": "elastic-volume"
                                }
                            }
                        ]
                    }
                }
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions