github.com/spotahome/redis-operator@v1.2.4/docs/development.md (about)

     1  # Development
     2  
     3  ## Folder structure
     4  
     5  ### Code folder structure
     6  
     7  - **api**: definition of the RedisFailover CRD.
     8  - **client**: autogenerated client to interact with redis-failovers.
     9  - **cmd**: contains the starting point of the application.
    10  - **log**: wrapper of logrus, created to be able to mock it.
    11  - **metrics**: exposer of status of the failovers created.
    12  - **mocks**: contains the mocked interfaces for testing the application.
    13  - **operator**: the main logic. Manages the requests from k8s and creates/updates/deletes the pieces as needed.
    14  - **service**: services/clients to interact with k8s and redises.
    15  - **vendor**: vendored packages used by the application.
    16  
    17  ### Non-code folder structure
    18  
    19  - **charts**: helm chart to deploy the operator.
    20  - **docker**: Dockerfiles to generate redis-failover docker images.
    21  - **example**: yaml files with spec of redis-failover.
    22  - **hack**: scripts to generate the redis-failover api-client.
    23  - **scripts**: scripts used to build and run the app.
    24  
    25  ## Make development commands
    26  
    27  You can do the following commands with make:
    28  
    29  - Build the development container.
    30    `make docker-build`
    31  - Generate mocks.
    32    `make go-generate`
    33  - Generate client
    34    `make update-codegen`
    35  - Run tests.
    36    `make test`
    37  - Build the executable file.
    38    `make build`
    39  - Run the app.
    40    `make run`
    41  - Access the docker instance with a shell.
    42    `make shell`
    43  - Install dependencies
    44    `make get-deps`
    45  - Update dependencies
    46    `make update-deps`
    47  - Build the app image.
    48    `make image`